I want to have a QGraphicsView that never scrolls automatically.
Similar: Basically, my question is identical to http://developer.qt.nokia.com/forums/viewthread/2220 , but that thread didn't receive an answer.
What I have tried so far:
See also http://doc.qt.io/qt-4.8/qgraphicsview.html.
My solution is a bit sketchy but I think it's pretty intuitive: If you don't want the QGraphicsView to ever scroll your stuff, override the virtual method scrollContentsBy.
void QGraphicsViewDerived::scrollContentsBy(int, int)
{
//don't do anything hah!
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With