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)
}
}
}
In the above example, console output is only generated for
- 2+ touch points
- mouse with button pressed
- 1 touch point with trackpad pressed
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:
- 1+ touch points (including on trackpad)
- mouse without button pressed