File: buttonontouch.qml

package info (click to toggle)
qtdeclarative-opensource-src 5.15.8%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 259,256 kB
  • sloc: javascript: 512,396; cpp: 495,775; xml: 8,892; python: 3,304; ansic: 2,764; sh: 206; makefile: 62; php: 27
file content (100 lines) | stat: -rw-r--r-- 2,064 bytes parent folder | download | duplicates (15)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import QtQuick 2.0
import Qt.test 1.0

Rectangle {
    id: root
    width: 300
    height: 800
    color: "green"

    Rectangle {
        color: "blue"
        height: 400
        width: parent.width


        PinchArea {
            pinch.target: button1
            objectName: "pincharea"
            anchors.fill: parent

            pinch.minimumScale: 0.1
            pinch.maximumScale: 10.0
        }

        Rectangle {

            id: button1
            objectName: "button1"
            y: 100
            height: 100
            width: parent.width
            Text { text: "Button 1" }

            EventItem {
                objectName: "eventItem1"
                height: 100
                width: 300
            }
        }

        Rectangle {
            objectName: "button2"
            y: 300
            height: 100
            width: parent.width
            Text { text: "Button 2" }

            EventItem {
                objectName: "eventItem2"
                height: 100
                width: 300
            }
        }
    }

    Rectangle {
        y: 400
        width: parent.width
        height: parent.height
        color: "red"

        MultiPointTouchArea {
            objectName: "toucharea"
            anchors.fill: parent

            y: 400
            height: 400

            Rectangle {
                objectName: "button3"
                y: 100
                height: 100
                width: parent.width
                Text { text: "Button 3" }

                EventItem {
                    objectName: "eventItem3"
                    height: 100
                    width: 300
                }
            }

            Rectangle {
                objectName: "button4"
                y: 300
                height: 100
                width: parent.width
                Text { text: "Button 4" }

                EventItem {
                    objectName: "eventItem4"
                    height: 100
                    width: 300
                }
            }

        }
    }
}