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

QQuickWidget buttons triggered twice on touch press when stylus is hovering on another widget



    • Windows


      Context: https://bugs.kde.org/show_bug.cgi?id=437196

      When a pen stylus is hovering and moving on another QWidget, pressing a QML button in a QQuickWidget may cause it to be triggered twice.

      Attached is a test project. To reproduce:

      • Hover pen stylus on the right-hand area and move it around continuously.
      • Press the button on the left-hand side using touchscreen.
      • Observe the "Button is pressed" message in the console.

      Sometimes you can see two "Button is pressed" messages printed consecutively.

      My suspect is the change in https://codereview.qt-project.org/c/qt/qtbase/+/267594, which was supposed to fix QTBUG-76617. The code checks for the last WM_POINTERUPDATE / WM_POINTER* pointer type to set Qt::MouseEventSynthesizedBySystem, which in theory could fail to work properly if the WM_POINTERUP and WM_LBUTTONDOWN messages produced from the touch press event is interleaved with a WM_POINTERUPDATE message from the pen movement.

      It probably is still reproducible on Qt 5.15.* and 6 but I cannot test it locally for now.


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



            srutledg Shawn Rutledge
            alvinhochun Alvin Wong
            0 Vote for this issue
            3 Start watching this issue



              Gerrit Reviews

                There are no open Gerrit changes