Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-10897

would like to know whether QGraphicsView has an active rubberband

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P4: Low
    • None
    • 4.6.2, 4.7.0
    • Widgets: GraphicsView
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            richard Richard Moe Gustavsen
            andres Andres Kruse
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes