Skip to content
IlyaferiloPublic

About

Vertical carousel based on Qt QGraphicsScene

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

Carousel

A Vertical animated carousel based on QGraphicsScene. You can Interact with the scene elements by mouse wheel or mouse click, and keyboard up and down arrows are also supported. Scene supports any elements inherited from QGraphicsObject, see method: void add(QGraphicsObject* item);. The scene elements can be of different types, but of the same size, for set item size use void Carousel::setItemSize(const QSizeF& itemSize);.

Example Usage

Example

#include "carousel/carousel.h"

int main(int argc, char* argv[])
{
    QApplication a(argc, argv);
    QGraphicsView v;
    Carousel c;
    c.setBackground(Qt::darkCyan);
    for (int i = 0; i < 1000; i++) {
        c.add(new QGraphicsTextItem(QString::number(i)));
    }
    v.setScene(&c);
    c.setSceneRectangle(v.rect());
    v.show();
    return QApplication::exec();
}

About

Vertical carousel based on Qt QGraphicsScene

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages