anwar.qt
28th September 2012, 12:15
I have multiple QGraphicsItems in scene spread across different parts of scene. In application there are different modes in one of mode user can scroll the scene (palm drag mode).
To achieve scrolling over scene I set dragMode of QGraphicsView to ScrollHandDrag.
But the problem is when user try to scroll over scene by dragging (MousePress and MouseMove) on any of QGraphicsItem instead of scrolling scene it moves QGraphicsItem.
How can I stop movement of QGraphicsItem and scroll the scene, but I still want to select QGraphicsItems?
NOTE : There are very large number of QGraphicsItems and are of various type.
So It is not possible to install event filter on QGraphicsItems.
To achieve scrolling over scene I set dragMode of QGraphicsView to ScrollHandDrag.
But the problem is when user try to scroll over scene by dragging (MousePress and MouseMove) on any of QGraphicsItem instead of scrolling scene it moves QGraphicsItem.
How can I stop movement of QGraphicsItem and scroll the scene, but I still want to select QGraphicsItems?
NOTE : There are very large number of QGraphicsItems and are of various type.
So It is not possible to install event filter on QGraphicsItems.