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

Mouse Wheel event gets propagated even when event filter should stop it

    XMLWordPrintable

Details

    • 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

        1. qtbug67032_diag.diff
          5 kB
        2. qtbug67032.zip
          2 kB
        3. qtbug67032.zip
          0.9 kB

        Issue Links

          For Gerrit Dashboard: QTBUG-67032
          # Subject Branch Project Status CR V

          Activity

            People

              vhilshei Volker Hilsheimer
              jussi_witick Jussi Witick
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes