Details
-
Suggestion
-
Resolution: Unresolved
-
P4: Low
-
None
-
4.6.2, 4.7.0
-
None
Description
it would be useful if I could ask the view whether it has a rubberband active.
My GraphicsScene creates a new GraphicsItem in mouseReleaseEvent(), however if the user has used a rubberband to select multiple items then this is the wrong behavior. So what I do now is to intercept mousePressEvent(), remember scenePos() and in mouseReleaseEvent() I check whether the mouse has moved between press and release. If it has, the scene won't create a new item. However, this is not very elegant, instead it would be good if the scene could find out whether the mouseReleaseEvent is due to any of the views having a rubberband...
alternatively if there was a method in GraphicsView which is called prior to creating the rubberband and then another one when the rubberband is closed that would be ok as well.
alternatively if there was a method in GraphicsView to find out what state the view is in, that would also be ok.