I would reimplement QGraphicsView::scrollContentsBy() in a subclass of QGraphicsView and fish out the deltas. Or connect to the scrollbars to find when the scroll bar values have changed.
I would reimplement QGraphicsView::scrollContentsBy() in a subclass of QGraphicsView and fish out the deltas. Or connect to the scrollbars to find when the scroll bar values have changed.
Bitto / Andreas Aardal Hanssen - andreas dot aardal dot hanssen at nokia
Nokia Software Manager, Qt Development
I hoped there would be a way without subclassing QGraphicsView.
I tried to connect to the scrollbars but the problem is I never know when the moving is finished. The dragging is done by scrolling. First the horizontalScrollBar is changed than the verticalScrollBar. But the scrollbar only signal if their values actually have been changed. So the dragging can stop with a horizontal or a vertical scrolling signal.
Regards
Lodorot
What about creating a QPoint(yourView.width()/2, yourView.height/2) and feeding it to mapToScene()?
Bookmarks