| changeset 30 | 5dc02b23752f |
| 29:b72c6db6890b | 30:5dc02b23752f |
|---|---|
1 import Qt 4.7 |
|
2 |
|
3 Rectangle { |
|
4 id: card |
|
5 width: 100; height: 100 |
|
6 |
|
7 states: [ |
|
8 State { |
|
9 name: "placed" |
|
10 onCompleted: card.state = "idle" |
|
11 StateChangeScript { script: console.log("entering placed") } |
|
12 }, |
|
13 State { |
|
14 name: "idle" |
|
15 StateChangeScript { script: console.log("entering idle") } |
|
16 } |
|
17 ] |
|
18 |
|
19 MouseArea { |
|
20 anchors.fill: parent |
|
21 onClicked: card.state = "placed" |
|
22 } |
|
23 } |