Hi,
how can i make a QGraphicsView follow e.g. a QGraphicsRectItem which is movable, when i drag it outside the visible area of the view?
Right now the scrollbars appear, but the item is not focused/visible.
thanks in advance
sven
Hi,
how can i make a QGraphicsView follow e.g. a QGraphicsRectItem which is movable, when i drag it outside the visible area of the view?
Right now the scrollbars appear, but the item is not focused/visible.
thanks in advance
sven
Hi Steve,
I am facing the same problem, did you got any clue???
Thank you.
not yet steve...
How about QGraphicsView::centerOn or QGraphicsView::ensureVisible ??
No, that doesnt affect the ScrollBars...
I thought of sth like connecting the scrollbars to sceneRectangle which is actually impossible..
You should be able to install an event filter on the dragged object or better yet subclass the item and reimplement its itemChange() method. In there you can get the new item position and adjust the view accordingly.
Bookmarks