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

XCB: Tablet events doesn't work with QtQuick

    XMLWordPrintable

Details

    • Linux/X11
    • 8e822e981d91e688799c8670f11dfdf6aaf9e0d1 (qt/qtdeclarative/5.15)

    Description

      Using a tablet like Wacom with stylus and eraser doesn't work with QML items, such as TapHandler.
      Setting:

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

      Makes it not working at all.

      Please run the example code bellow:

      import QtQuick 2.12
      import QtQuick.Window 2.12
      
      Window {
          id: root
          visible: true
          width: 1024
          height: 768
          title: qsTr("Hello World")
      
          Item {
              id: glassPane
              z: 10000
              anchors.fill: parent
              PointHandler {
                  id: handler
                  acceptedDevices: PointerDevice.Stylus | PointerDevice.Eraser
                  target: Rectangle {
                      parent: glassPane
                      color: "red"
                      visible: handler.active
                      x: handler.point.position.x - width / 2
                      y: handler.point.position.y - height / 2
                      width: 20; height: width; radius: width / 2
                  }
              }
          }
      }
      

      In case the documentation should mention it, that it is not supported.

      Attachments

        Issue Links

          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
              karimpinter Karim Pinter
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are 2 open Gerrit changes