Simulating of QTouchEvent



  • Hi All!

    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.



  • First create QListQTouchEvent::TouchPoint touchPoints, and hand it over to the QTouchEvent constructor: http://doc.qt.nokia.com/latest/qtouchevent.html#QTouchEvent


Log in to reply
 

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