Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.12.8, 5.15.2, 6.2.0, 6.2.1
-
None
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.