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

Mouse move events in QGraphisScene ignore the middle mouse button

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.12.8, 5.15.2, 6.2.0, 6.2.1
    • None
    • Linux/Wayland, Linux/X11

    Description

      Take a QGraphicsScene connected to a QGraphicsView with activated mouse tracking (graphicsView->setMouseTracking(true)). Logging mouse events in QGraphicsScene::event(QEvent *event) while using the middle mouse button shows the following:

      Press the middle mouse button.

      • EXPECTED: QGraphicsScene::event is called immediately with an event of type QEvent::GraphicsSceneMousePress
      • ACTUAL: QGraphicsScene::event will be called right before releasing the button (see below).

      Move the mouse while keeping the middle mouse button pressed.

      • EXPECTED: The caused mouse events should have QGraphicsSceneMouseEvent::buttons() == Qt::MiddleButton
      • ACTUAL: The events have QGraphicsSceneMouseEvent::buttons() == Qt::NoButton.

      Release the middle mouse button.

      • QGraphicsScene::event is called twice: First with an event of type QEvent::GraphicsSceneMousePress (which I expected earlier, see above), then with an event of type QEvent::GraphicsSceneMouseRelease (as expected)

      For left and right buttons everything works as expected.

      Minimal code for logging this kind of events is attached.

      Attachments

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

        Activity

          People

            srutledg Shawn Rutledge
            valentinb Valentin B
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes