Qt 6.1 Quick DragHandler Reporting Wrong Coordinates using TouchScreen Input
-
The following Qt 6.1 Quick program reports wrong x and y coordinate values using the TouchScreen Input.
import QtQuick import QtQuick.Window Window { width: 1000 height: 1000 visible: true Text { text: handler.centroid.position.x.toFixed(1) + "," + handler.centroid.position.y.toFixed(1) } DragHandler { id: handler target:null } }
When touching and untouching the screen report correct x and y coordinate, but while dragging wrong values are reported.
It occurs under Windows 10 and when the display scaling is set to values other than 100%.
For my instance, the display scaling is set to 200% and the value reported was twice the expected value.
For example, I was touching x:300 y:300, but it was reporting x:600 y:600Other input methods such as mouse or stylus was OK.
It seems that code for handling TouchScreen Input under HiDPI is buggy.Does anyone have similar issues? Or is there a setting to overcome this problem?
-
The following Qt 6.1 Quick program reports wrong x and y coordinate values using the TouchScreen Input.
import QtQuick import QtQuick.Window Window { width: 1000 height: 1000 visible: true Text { text: handler.centroid.position.x.toFixed(1) + "," + handler.centroid.position.y.toFixed(1) } DragHandler { id: handler target:null } }
When touching and untouching the screen report correct x and y coordinate, but while dragging wrong values are reported.
It occurs under Windows 10 and when the display scaling is set to values other than 100%.
For my instance, the display scaling is set to 200% and the value reported was twice the expected value.
For example, I was touching x:300 y:300, but it was reporting x:600 y:600Other input methods such as mouse or stylus was OK.
It seems that code for handling TouchScreen Input under HiDPI is buggy.Does anyone have similar issues? Or is there a setting to overcome this problem?
@qtnewbie12345
I observed the same issue on Windows with HDPI displays (scaling > 100%). It seems that the '(active)Translation.x/y' values are correct when the dragHandler activates but the finger is not moving - as soon as the finger moves, the reported translation values are scaled (and no longer relative to the first touch point). Did you report this as a bug? If not, I am happy to do that. -
@RainerG
I have not reported this as a bug. It will be great if you could report it for me.
It still occurs on Qt 6.2. The phenomenon is exactly as you have described.
Best Regards -
@qtnewbie12345
I observed the same issue on Windows with HDPI displays (scaling > 100%). It seems that the '(active)Translation.x/y' values are correct when the dragHandler activates but the finger is not moving - as soon as the finger moves, the reported translation values are scaled (and no longer relative to the first touch point). Did you report this as a bug? If not, I am happy to do that.