Important: Please read the Qt Code of Conduct -

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:
    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:

Log in to reply