aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/pointerhandlers/qquickpinchhandler/data/nullTarget.qml
blob: 9d9903fc0ec15f410ce06c7dbb60cf1762aa8632 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

import QtQuick 2.15

Item {
    width: 320; height: 320
    property alias pinchScale: pinch.scale

    Rectangle {
        objectName: "blackrect"
        width: 200; height: 200
        color: "black"
        antialiasing: true
        scale: pinch.scale
        rotation: pinch.rotation
        x: pinch.translation.x
        y: pinch.translation.y

        PinchHandler {
            id: pinch
            target: null
            minimumScale: 0.5
            maximumScale: 4
        }

        Text {
            color: "cyan"
            anchors.centerIn: parent
            text: "scale " + pinch.scale.toFixed(2) + " activeScale " + pinch.activeScale.toFixed(2)
        }
    }
}