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

Mouse release event is not received on QGraphicsScene if context menu is opened between press and release events

XMLWordPrintable

      Within a QGraphicsScene the mouse release event following a mouse press event is not recieved when between mouse press and mouse release a context menu is opened using keyboard shortcuts (menu key).

      This prevents e.g. the QGraphicsView mouse dragging mode from stopping when releasing the left mouse button. Resulting in an endless dragging mode.

      This can be reproduced with example attached.

      Steps to reproduce:
      1. Download and unpack a demo attached.
      2. Run it
      3. Press the left mouse button
      4. Call context menu by prassing context menu button on your keyboard
      5. Release mouse button
      6. Press escape to close context menu
      7. Observe, the mouse cursor was not change to its default openhand icon

      As expected behaviour here:
      The mouse cursor is changed to the openhand icon

      Can be workarounded with

      qApp->installEventFilter(this);

      in

      QGraphicsScene

      re-implementation

            mmutz Marc Mutz
            kileppal Kimmo Leppälä
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: