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

PointHandler doesn't work with tablet input

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.2, 6.5.0
    • None
    • Acer Spin 13 tablet with Windows 11
    • Windows

    Description

      In the example given by the piece of code below, a PointHandler is used to handle input events. When testing the example, when a pen tablet is pressed and moved on the screen, the PointHandler immediately becomes inactive. So the output of the code below is something like:

      qml: active true
      qml: moving QPointF(218.667, 190)
      qml: active false
      
      import QtQuick 2.15
      import QtQuick.Window 2.15
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          Text { id: positionText }
      
          PointHandler {
              onActiveChanged: {
                  console.debug("active", active)
              }
              onPointChanged: {
                  if(!active) return
                  console.debug("moving", point.position)
                  positionText.text = point.position.x + " " + point.position.y
              }
          }
      
      }
      

      On Qt 5.15.2, the logs show this message repeatedly:

      qt.quick.touch.target: QQuickPointHandler(0x1e36a3d6ec0) pointId 1 is missing from current event, but was neither canceled nor released

      On Qt 6.5.0, this message is not shown. As a workaround on Qt 6.5.0, using

      app.setAttribute(Qt::AA_SynthesizeMouseForUnhandledTabletEvents, false);
      

      makes the example behave as expected, but not on Qt 5.15.2.

      I think this may be related to QTBUG-112686 and possibly QTBUG-114323 too.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            daljit97 Daljit Singh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes