equal
deleted
inserted
replaced
|
1 import Qt 4.7 |
|
2 |
|
3 Rectangle { |
|
4 id: wrapper |
|
5 width: 240 |
|
6 height: 320 |
|
7 Rectangle { |
|
8 id: myRect |
|
9 color: "red" |
|
10 width: 50; height: 50 |
|
11 x: 100; y: 100 |
|
12 } |
|
13 states: State { |
|
14 name: "state1" |
|
15 PropertyChanges { target: myRect; border.color: "blue" } |
|
16 } |
|
17 transitions: Transition { |
|
18 ColorAnimation { target: myRect; to: "red"; property: "border.colr"; duration: 1000 } |
|
19 } |
|
20 Component.onCompleted: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1"; |
|
21 } |