DragHandler gives incorrect Translation values
-
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-118069Here is a sample video:
https://youtu.be/9yyg89seXdsHere 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!