Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

    Simulating of QTouchEvent

    General and Desktop
    2
    2
    2728
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • I
      iShurf last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • M
        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

        1 Reply Last reply Reply Quote 0
        • First post
          Last post