I would like to retain the ability of a user to zoom and drag a QGraphicsScene
, thus I cannot simply lock the QGraphicsView
.
However a user should not be able to drag a QGraphicsItem
out of the scenes viewport. Therefore I am looking for a way to interrupt a MouseDragEvent without ignoring the DragMoveEvent (aka have the QGraphicsItem
jump back to its origin point). I have tried to accomplish this behaviour using the releaseMouse()
-function but that didn't work at all. Any suggestions?
Thanks!