Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Touchscreen rotation causes 2 touch events
Forum Updated to NodeBB v4.3 + New Features

Touchscreen rotation causes 2 touch events

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 326 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.
  • T Offline
    T Offline
    therealmatiss
    wrote on last edited by
    #1

    Hello!
    I have a weird problem with Qt 6.2.2 QML. I have a portrait display that is running QML in landscape (Loader is rotated by 90 degrees). The issue is that touch scrolling events are not rotated properly so I am trying to rotate the touchscreen by this export:
    QT_QPA_GENERIC_PLUGINS=evdevtouch:/dev/input/event0:rotate=90

    But the issue is, then I have 2 touch events - one is non-rotated previous one and then another one, which is corrected - rotated. This is the QPA log I have, which shows only when I have the rotation enabled:

    qt.qpa.input.events: reporting TouchPoint(1255 @QRectF(455.993,767.966 22.0344x22.0344) normalized QPointF(0.974969,0.974948) press 1 vel QVector2D(0, 0) state 1
    point is not in activePoints QEventPoint(id=0 ts=99725 pos=8,13 scn=467,20 gbl=467,20 Pressed ellipse=(8x8 ∡ 0) vel=0,0 press=8,13 last=8,13 Δ 0,0)
    qt.qpa.input.events: reporting TouchPoint(1255 @QRectF(455.993,767.966 22.0344x22.0344) normalized QPointF(0.974969,0.974948) press 0 vel QVector2D(0, 0) state
    

    So now the problem is - how can I get rid of the non-rotated touch events? I want only the rotated touch events.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MarkK11
      wrote on last edited by
      #2

      To resolve the dual touch event issue in Qt QML, you might need to disable the native touch event handling and manage the rotation programmatically within your application. Consider using QTouchEvent and QTransform to apply a custom rotation to the touch events. Additionally, ensure that only one touch input device is active to prevent duplicate events.

      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 Extensions
      • Unsolved