When I select several QGraphicsItem (with Ctrl key) I can move them together, but the mouseMoveEvent is triggered only for the item that actually receives the event. Is there a way to make every selected items receive the event ? I can’t find it in Qt’s doc.
Could I group selected items together and handle it within QGraphicsView’s mouseMoveEvent ?
Thanks a lot for any help 🙂
No there is no default way to do what you want as far as I know. Something you could do is the following:
QGraphicsSceneand implement themouseMoveEventitemAtfunctionisSelected), get all selected items of the scene.Sample code follows: