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

QQuickWindow::tabletEvent() broken in Qt 6.2.1

    XMLWordPrintable

Details

    • Linux/X11
    • 13a0da5bd2cf59aeb343fe9345b9bac2cfbb5e6f (qt/qtdeclarative/dev) c7b763e02a337dce5f7bb0ead594fbce57c21a36 (qt/qtdeclarative/6.2)

    Description

      I first posted about this here on the forums: https://forum.qt.io/topic/131564/qquickwindow-tabletevent-no-longer-works-in-qt6

       

      In a nutshell, I'm trying to port my Qt 5.15.2 app over to Qt 6.2.1.  I'm running on (Ubuntu) Linux w/ GCC and a Wacom tablet.  I sub classed `QQuickWindow` and did an override of `tabletEvent()` to handle, well, Wacom tablet events and then pass them over to QML.  I noticed that it wasn't picking up any tablet events at all.  I've attached a minimal amount of sample code that:

      • Creates a `QQuickWindow` subclass which overrides `tabletEvent()`.  Inside of it, there are `qDebug()` statements
      • The subclass is registered to QML in the `main()` function.
      • In `main.qml`, this window subclass is used as the root window

      If you load the project into Qt Creator, and do a Desktop build, one with Qt 5.15.2 and the other with 6.2.1.

      You'll notice that 5.x will debug print a lot of messages when using a tablet device over the window (e.g. hover events).  But 6.x will not print any debug messages, which means that `QQuickWindow::tabletEvent()` overrides are broken for this version of Qt.


       

      I understand that the input handling system was changed in Qt, and this might have been a causality, but this is a show stopper for me porting my app to the newer Qt.  I did notice that the supplied tablet example did work, but that doesn't use QML.  The only work around I can think of is to subclass `QQuickWidget` and have that intercept (and dispatch tabtlet events) to QML, but that's a bit of work.

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              define-private-public Ben S
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes