Unsolved Windows touchscreen DPI scaling
-
Anybody using Qt 6.2 on Windows with a high DPI touchscreen? I am getting a mix of scaled and unscaled coordinates when dragging with the touchscreen, resulting in jitter in objects dragged on the screen. The issue affects both MultiPointTouchArea and MouseArea, and doesn't occur in Qt 5.15.6
Here is some very simple code to show the problem:
import QtQuick 2.15 import QtQuick.Window 2.15 Window { width: 640 height: 480 visible: true title: qsTr("Hello World") Rectangle { id : red_rect x: 0 y: 0 width: 100 height: 100 color:"red" } // MultiPointTouchArea { // anchors.fill: parent // onTouchUpdated: function(touchPoints) { // if (touchPoints.length === 1) // { // let p = touchPoints[0] // console.log("Single touch at ", p.x, p.y) // red_rect.x = p.x - 50 // red_rect.y = p.y - 50 // } // } // } MouseArea { anchors.fill: parent onPressed : function(mouse) { mouse.accepted = true; } onPositionChanged: function(mouse) { let p = mouse console.log("Mouse drag at ", p.x, p.y, "source=", mouse.source) red_rect.x = p.x - 50 red_rect.y = p.y - 50 } } }
-
@bee65 said in Windows touchscreen DPI scaling:
I found a bug report already on this: QTBUG-97185