如何在QML中处理手写笔/笔输入

问题描述 投票:0回答:1

我正在创建一个简单的绘图应用程序,并希望我的应用程序处理笔(像Apple Pencil这样的手写笔)输入。该应用程序是用Qml / Qt Quick编写的。我知道使用QWidgets时可以使用QTabletEventexample)处理数位板事件,但是我如何处理QML中的笔输入(使用MouseArea不起作用,并且我对PointHandler也没有运气)。有谁知道是否可以在Qt Quick中处理笔输入?

qt qml touch stylus-pen
1个回答
0
投票

尝试使用QML TapHandler:https://doc.qt.io/qt-5/qml-qtquick-taphandler.html

acceptedDevices: PointerDevice.Mouse | PointerDevice.Stylus
© www.soinside.com 2019 - 2024. All rights reserved.