Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
None
-
5.10.1, 5.11.2, 5.12.0
-
Windows, Linux
-
92df790f46b3a8b17aec2f385d6472fd3f8647f6 (qt/qtbase/dev)
-
Bug Fixing Week Q2/2020, Bug Fixing Candidates
Description
Mouse Wheel event gets propagated to parent widgets even when event filter is installed and is returning true for the specified event.
Only way to stop the wheel event is to accept the event, which will stop propagation regardless of the event filter's return value.
Steps to reproduce:
- Run attached sample
- Use mouse wheel
- EXPECTED: Wheel event is not received by the MainWindow's event filter
- ACTUAL: Wheel events are leaked through to MainWindow even when event filter of the centralWidget should stop it
With same steps using mouse left button, the button press is never leaked to the MainWindow.
QWidgetWindow/"TopWindow" QMouseEvent(MouseButtonPress, LeftButton, localPos=104,53, screenPos=104,82) 0x7ffc95a02dc0 QWidget/"central" QMouseEvent(MouseButtonPress, LeftButton, localPos=104,53, screenPos=104,82) 0x7ffc95a02a20 MouseButtonPress on "central" central" QMouseEvent(MouseButtonPress, LeftButton, localPos=104,53, screenPos=104,82) 0x7ffc95a02a20 accepted=true returns true QWidgetWindow/"TopWindow" QWheelEvent(pixelDelta=QPoint(0,0), angleDelta=QPoint(0,-120)) 0x7ffc95a02e50 QWidget/"central" QWheelEvent(pixelDelta=QPoint(0,0), angleDelta=QPoint(0,-120)) 0x7ffc95a029c0 Wheel on "central" "central" QWheelEvent(pixelDelta=QPoint(0,0), angleDelta=QPoint(0,-120)) 0x7ffc95a029c0 accepted=false returns true QMainWindow/"Top" QWheelEvent(pixelDelta=QPoint(0,0), angleDelta=QPoint(0,-120)) 0x7ffc95a029c0 Wheel on "Top" "Top" QWheelEvent(pixelDelta=QPoint(0,0), angleDelta=QPoint(0,-120)) 0x7ffc95a029c0 accepted=false returns true
Compared to Qt 4
"4.8.7" () QWidget/""central"" QWheelEvent(delta=-120, pos=QPoint(107,64) , orientation= 2 ) 0x7ffe9da84e80 accepted= true spont
Attachments
Issue Links
- relates to
-
QTBUG-47007 mousePressEvent of QWidget gets called even though QTabletEvent was accepted [Qt 5.4.2]
- Closed
-
QTBUG-50199 [OS X] Mouse scroll event started from one widget continues when moving mouse cursor over another widget
- Closed
-
QTBUG-59214 Wacom: it seems tabletEvent() by deault accepting it.
- Closed
-
QTBUG-65199 Using a tablet (wacom intuos pro) fails to provoke enter/leave events when a widget border is crossed
- Closed