blob: dee82f52ed7cf08d57643b3396e2f0bb551656a1 (
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
import QtQuick 2.12
import Qt.test 1.0
Item {
id: root
readonly property int someProp: 1234
property bool state1Active: false
property bool state2Active: false
StateGroup {
states: [
State {
id: state1
name: "state1"
when: state1Active
changes: [
PropertyChanges {
objectName: "propertyChanges1"
target: ContainingObj.obj
prop: root.someProp
}
]
}
]}
StateGroup {
states: [
State {
id: state2
name: "state2"
when: state2Active
changes: [
PropertyChanges {
objectName: "propertyChanges2"
target: ContainingObj.obj
prop: 11111
}
]
}
]
}
Component.onCompleted: {
state1Active = true;
state2Active = true;
ContainingObj.reset()
}
}
|