Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Simulating of QTouchEvent
Qt 6.12 LTS is out! See what's new in the release blog

Simulating of QTouchEvent

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.2k Views 1 Watching
  • 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 Offline
    I Offline
    iShurf
    wrote on last edited by
    #1

    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
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      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
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt
      • Unsolved