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

Release shift before left mouse button during rubberband mode does not erase rubberband

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P3: Somewhat important
    • None
    • 5.5.1
    • Widgets: GraphicsView
    • None

    Description

      In a class that derives from qgraphicsview, override mousePressEvent(). In there, test for the shift modifier, and if so, turn on rubber-band dragging (setDragMode(rubberband)). In the mouseReleaseEvent, use setDragMode(dragcanvas). Now when you run the program, press the shift key and hold, click left mouse button and drag, holding the click; the rubber band appears and forms a rectangle based on where the mouse cursor is; now release the shift key, without releasing the left mouse button; the rubber band does NOT disappear. Note that if you release the left button before the shift, the rubber band does disappear. According to a reply to a post,

      Technically I believe this is a bug caused by setDragMode not setting private d->rubberBanding = false; This is making paint to draw last set d->rubberBandRect even technically in the current selection or dragging mode such rfectangle should not be displayed. Unfortunately since problem is in a private inaccessible variables fixing a source of the problem seems impossible.

      This issue is discussed in http://forum.qt.io/topic/64033/invalidatescene-problem/7.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            schollii schollii
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes