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

TapHandler tapped signal is emitted twice when using a stylus

    XMLWordPrintable

Details

    • Windows
    • 31e7790102 (qt/qtbase/dev) 31e7790102 (qt/tqtc-qtbase/dev) f35ad8f32f (qt/tqtc-qtbase/6.2) 97c95f606f (qt/qtbase/6.4) 97c95f606f (qt/tqtc-qtbase/6.4) 97c95f606f (qt/tqtc-qtbase/6.4.1) 97c95f606f (qt/tqtc-qtbase/tqtc/qtinsight-6.4)

    Description

      In the following code, we have a simple TapHandler that logs a message using the onTapped signal handler.

       

      import QtQuick 2.15
      import QtQuick.Window 2.15
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          TapHandler{
              id: tapHanlder
              acceptedDevices: PointerDevice.Stylus | PointerDevice.Pen
              onTapped: {
                  console.debug("Clicked!", Date.now()) // this gets printed twice
              }
          }
      }

       

      When running this code and testing with a stylus (I've tested this with a graphic tablet and a Samsung S Pen on Windows 11), the TapHandler emits the signal twice so the console message gets printed twice. If on the other hand, the TapHandler is used with a mouse the code behaves as expected. This seems to be another bug affecting the Qt Quick tablet input system on Windows (I couldn't reproduce this bug on Linux), which is basically unusable and too buggy to be used in production (see QTBUG-98242 and QTBUG-98037). 

      Attachments

        Issue Links

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

          Activity

            People

              anrocha André De La Rocha (Inactive)
              daljit97 Daljit Singh
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: