Pau*_*one 5 mouse qt multi-touch qml
A MultiPointTouchArea with mouseEnabled:true and minimumTouchPoints:1 doesn't appear to support mouse movements when the mouse button is not pressed (tested on MacBook Air with mouse and Windows 10 with mouse) nor single point touch events (tested on a Macbook Air trackpad).
import QtQuick 2.5
Rectangle {
id: root
width: 800
height: 300
MultiPointTouchArea {
anchors.fill: parent
mouseEnabled: true
minimumTouchPoints: 1
maximumTouchPoints: 10
onUpdated: {
for (var touch in touchPoints)
console.log("Multitouch updated touch", touchPoints[touch].pointId, "at", touchPoints[touch].x, ",", touchPoints[touch].y)
}
}
}
Run Code Online (Sandbox Code Playgroud)
In the above example, console output is only generated for
I have tried layering a MultiPointTouchArea over a MouseArea and setting mouseEnabled:false also. This lets mouse click events to propagate but mouse PositionChanged signals do not get received by the MouseArea. So the end result is the same as above.
Is there a way to support:
| 归档时间: |
|
| 查看次数: |
2161 次 |
| 最近记录: |