Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. DragHandler gives incorrect Translation values

DragHandler gives incorrect Translation values

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 251 Views
  • 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
    Iemon
    wrote on last edited by Iemon
    #1

    Hi,

    I'm using the DragHandler QML type on touchscreens with a custom location property within the onActiveTranslationChanged call. I've observed that it often provides incorrect translation values when two fingers are used, particularly when users zoom in and out or rotate the object. This results in the object "jumping" to another location. I have come across somewhat similar bug reports. As one suggested, upgrading to Qt v6.4.3 significantly reduced this behavior, although it did not fully resolve the issue. There were no differences in versions v6.5, v6.6, and v6.7-beta. I'm primarily seeking suggestions for workarounds or any bugs in my code.

    Platform: Windows 10 & 11 devices with touchscreen
    Qt version: v6.3~v6.7-beta
    Compiler: MSVC2019 64bit
    Related bug reports: QTBUG-97185, QTBUG-118069

    Here is a sample video:
    https://youtu.be/9yyg89seXds

    Here is the translation value log:

    qml: active changed
    qml: activeTranslation: 0 20.66666603088379
    qml: activeTranslation: 0 30.66666603088379
    qml: active changed
    qml: activeTranslation: 637.3333129882812 306.3333435058594 <- random jump of x and y
    qml: activeTranslation: 637.3333129882812 305
    ...
    

    Here is a minimal reproduction:
    main.qml
    Full repository
    *I used a custom object to track locations, but the behavior is the same even without it.

    I would appreciate any help, thanks!

    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