Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QQuickWindow::tabletEvent() no longer works in Qt6
Forum Updated to NodeBB v4.3 + New Features

QQuickWindow::tabletEvent() no longer works in Qt6

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 1 Posters 547 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Ben SB Offline
    Ben SB Offline
    Ben S
    wrote on last edited by Ben S
    #1

    I'm in the process of porting over a (QML) Qt5 app I wrote to Qt6. And it makes use of wacom pen input. For my project, I had to make a subclass of QQuickWindow and then override the tabletEvent() method to process wacom pen input. Which I would then have the app dispatch to the appropriate QML object. So my code was as follows

    class AppWindow : public QQuickWindow {
    Q_OBJECT
    // ...
    
     protected:
         /**Handle wacom pen events */
        virtual void tabletEvent(QTabletEvent *event) override;
    };
    /// ...
    

    And then in the overridden tabletEvent() method I had all of my logic that does the handling. When updating to Qt6, I saw that nothing was happening when I tried to use the Wacom pen. I inserted a qDebug() statement right at the top of the body of the function and I saw nothing print out. Then I built the same code against Qt5 and I saw the output of the qDebug().

    I did try out the Tablet painting example (build against Qt6) to verify it wacom pen support is still there; it worked for me. The one thing I noticed about it is that it has a QWidget subclass with Qt::WA_TabletTracking flipped on. I don't think that will work for me.

    Is this a known bug? Or did something change in Qt6 for how I should have a window handle Wacom pen input? E.g. a new QML/QtQuick control for tablet stuffs?

    1 Reply Last reply
    0
    • Ben SB Offline
      Ben SB Offline
      Ben S
      wrote on last edited by
      #2

      I forgot to mention that I'm using Qt 6.2.1 on (Ubunut) Linux w/ GCC.

      1 Reply Last reply
      0
      • Ben SB Offline
        Ben SB Offline
        Ben S
        wrote on last edited by
        #3

        I filed a bug report that has some sample code illustrating the issue: https://bugreports.qt.io/browse/QTBUG-97859

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved