aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/pointerhandlers/qquickpinchhandler/data/pinchproperties.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/pointerhandlers/qquickpinchhandler/data/pinchproperties.qml')
-rw-r--r--tests/auto/quick/pointerhandlers/qquickpinchhandler/data/pinchproperties.qml38
1 files changed, 32 insertions, 6 deletions
diff --git a/tests/auto/quick/pointerhandlers/qquickpinchhandler/data/pinchproperties.qml b/tests/auto/quick/pointerhandlers/qquickpinchhandler/data/pinchproperties.qml
index 3cabde5f59..1e6256cf03 100644
--- a/tests/auto/quick/pointerhandlers/qquickpinchhandler/data/pinchproperties.qml
+++ b/tests/auto/quick/pointerhandlers/qquickpinchhandler/data/pinchproperties.qml
@@ -30,11 +30,38 @@ import QtQuick 2.12
Rectangle {
id: whiteRect
- property real scale: -1.0
+ property real pinchScale: -1.0
property int activeCount : 0
property int deactiveCount : 0
width: 320; height: 320
color: "white"
+
+ PointHandler {
+ id: ph1
+ acceptedDevices: PointerDevice.TouchScreen
+ target: Rectangle {
+ parent: whiteRect
+ color: "cyan"
+ x: ph1.point.position.x - 3
+ y: ph1.point.position.y - 3
+ width: 6; height: 6; radius: 3
+ }
+ }
+
+ PointHandler {
+ id: ph2
+ acceptedDevices: PointerDevice.TouchScreen
+ target: Rectangle {
+ parent: whiteRect
+ color: "lightgreen"
+ x: ph2.point.position.x - 3
+ y: ph2.point.position.y - 3
+ width: 6; height: 6; radius: 3
+ }
+ }
+
+ Text { color: "magenta"; z: 1; text: "scale: " + blackRect.scale}
+
Rectangle {
id: blackRect
objectName: "blackrect"
@@ -43,8 +70,7 @@ Rectangle {
x: 50
width: 100
height: 100
- opacity: (whiteRect.width-blackRect.x+whiteRect.height-blackRect.y-199)/200
- Text { color: "white"; text: "opacity: " + blackRect.opacity + "\nscale: " + blackRect.scale}
+
Rectangle {
color: "red"
width: 6; height: 6; radius: 3
@@ -56,20 +82,20 @@ Rectangle {
PinchHandler {
id: pincharea
objectName: "pinchHandler"
- minimumScale: 1.0
+ minimumScale: 0.5
maximumScale: 4.0
minimumRotation: 0.0
maximumRotation: 90.0
xAxis.maximum: 140
yAxis.maximum: 170
onActiveChanged: {
- whiteRect.scale = pincharea.scale
+ whiteRect.pinchScale = pincharea.scale
if (active) ++activeCount
else ++deactiveCount;
}
onUpdated: {
- whiteRect.scale = pincharea.scale
+ whiteRect.pinchScale = pincharea.scale
//whiteRect.pointCount = pincharea.pointCount
}
}