Important: Please read the Qt Code of Conduct -

Scroll QGraphicsObject content with QScroller

  • I have a QGraphicsObject derived class with a certain bounding box.
    It has many items outside that bounding box.
    It has a QScroller pointer member variable.
    inside Constructor:

    scroller = QScroller::scroller(this);
    scroller->grabGesture(this, QScroller::LeftMouseButtonGesture);

    but scrolling does not work at all.
    How can I scroll content Items with QScroller?

Log in to reply