Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Simulating of QTouchEvent
iShurf last edited by
I'm writing an application for working with multi-touch HID-device (like interactive board). This device sends reports about up to three interaction points. So I want to convert this reports to QTouchEvents to be able to use Qt gestures in my application.
The way I decide to try is to create QTouchEvent for each device's original report and send it to the QCoreApplication:
@QCoreApplication::sendEvent(QObject *obj, QEvent event);@
I tried to create QTouchEvent manually:
@QTouchEvent tEvent = new QTouchEvent(QEvent::TouchBegin, QTouchEvent::TouchScreen);@
But how can I set touch points?
Can anyone help me? Is there any other way to solve my problem?
Thanks in advance.
mikkohar last edited by
First create QListQTouchEvent::TouchPoint touchPoints, and hand it over to the QTouchEvent constructor: http://doc.qt.nokia.com/latest/qtouchevent.html#QTouchEvent