Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Scroll bar follow the QGraphicsitem
erfan71 last edited by
I have a QgraphicsItem that i can Move it with mouse ,
I am using Qgraphicsscene and QgraphicsView for that ,
the problem is when i Move it in the Corner of the screen , Scroll bar start to move, but i can't see the Item . any more!!!
Now, to see the Item i must manually drag the Scroll bar !!!!!!!!!!
How can i do that , to always see the Item , ???
in other word , Scroll bar moves with the Item ....
Santosh Reddy last edited by
You may need to monitor the item movement explicitly using QGraphicsItem::itemChange(), and some how find out the view which it caused to move and for that view call QGraphicsView::ensureVisible()
I don't think there is a stright forward solution.