Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QML stylus event handling.



  • Hi,
    I'm creating a QML app for galaxy tab and i need to collect pressure data from stylus usage. I've been trying to use PointHandler:

        PointHandler {
            id: handler
        }
        Timer {
                interval: 100; running: true; repeat: true;
                onTriggered: { console.log(handler.point.pressure); }
            }
        }
    

    but the output is 0 or 1, nothing in between. Except when I'm using my finger, then app is just happy to feedback me with fraction pressure values.
    Qt Tablet Example (https://doc.qt.io/qt-5/qtwidgets-widgets-tablet-example.html) which uses Widgets, works just fine.

    I'm using Galaxy Tab S6 and QtQuick2.12.

    Thus come my questions: do PointHandler and HandlerPoint support stylus events? If not, Is there any other QML component that could get the job done?


Log in to reply