You are not logged in.

Dear visitor, welcome to If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.


Friday, September 28th 2012, 11:42am

Stop movement of QGraphicsItems on scene in ScrollHandDrag mode of QGraphicsView.

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.