-
Notifications
You must be signed in to change notification settings - Fork 0
/
Field.qml
45 lines (42 loc) · 901 Bytes
/
Field.qml
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
import QtQuick 2.0
Item {
property alias img: image1
property alias mA1: mouseArea1
Rectangle {
id: rectangle1
x: 0
y: 0
width: 150
height: 150
color: "#ffffff"
radius: 8
border.width: 4
Image {
id: image1
x: 8
y: 8
width: 134
height: 134
source: "p.png"
}
MouseArea {
id: mouseArea1
x: 8
y: 8
width: 134
height: 134
}
}
function change(a) {
if (a==1) {
image1.source = "o.png"
mouseArea1.enabled = false
} else if (a==2) {
image1.source = "iks.png"
mouseArea1.enabled = false
} else {
image1.source = "p.png"
mouseArea1.enabled = true
}
}
}