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:

    setCacheMode(QGraphicsItem::ItemCoordinateCache);
    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
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.