[SOLVED] Graphics tablet support, 2014?



  • Hello.
    I'm interested in developing an art creation program with the Qt framework and Python.
    I would like to know what is the current state of the QTabletEvent support on the desktop platforms.

    My main interest is that the program works on the 32 bit and 64 bit versions of Windows with support for the Wacom brand of graphics tablets, and I desire to later port the program to the other OSen.

    Is Qt5 currently supporting graphics tablet input on Windows (the Wintab territory)?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    AFAIK the support should be there. IIRC Krita's can make use of graphic tablets.



  • Hello SGaist, thank you for the reply.
    I think Krita uses Qt 4.8, where graphics tablet support is confirmed.

    After some more research, on Windows at least Qt 5.x does not seem to support this feature. It's not removed, it's just not functional.


  • Lifetime Qt Champion

    I can't tell, since they are part of KDE's stack they might be already using Qt 5 trough KDE's Framework (but I can't be too affirmative about that)

    The best would be to ask them directly, they might have more information to give you :)



  • Hello.
    As a follow-up, I successfully got tablet events on a Qt widget on Windows XP SP3. I'm glad that it works.
    The tablet that I used is a Wacom Bamboo Capture Pen & Touch (CTH470).

    I arranged a workspace with Python 3.4.1 and PyQt5, which packages Qt 5.3.2, and ran the following snippet:

    @import sys
    import PyQt5
    from PyQt5.QtWidgets import (QApplication, QWidget)

    class MyWidget(QWidget):
    def tabletEvent(self, e):
    print(e.pressure())

    app = QApplication(sys.argv)
    widget = MyWidget()
    widget.show()
    sys.exit(app.exec_())@

    When run, this snippet creates a simple widget (a blank window), and if you press the stylus when the cursor is on the widget the console starts printing the pressures of each tablet event that the widget is receiving.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.