Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativevaluetypes / data / conflicting.1.qml
1 import QtQuick 1.0
2
3 Rectangle {
4     id: root
5
6     width: 800
7     height: 600
8
9     property alias font: myText.font
10
11     property int myPixelSize: 12
12     property int myPixelSize2: 24
13     
14     Text {
15         id: other
16         font.pixelSize: 6
17     }
18
19     Text {
20         id: myText
21
22         text: "Hello world!"
23         font.pixelSize: myPixelSize
24     }
25
26     states: State {
27         name: "Swapped"
28         PropertyChanges {
29             target: myText
30             font: other.font
31         }
32     }
33
34     function toggle() {
35         if (root.state == "") root.state = "Swapped"; else root.state = "";
36     }
37
38     MouseArea {
39         anchors.fill: parent
40         onClicked: { if (root.state == "") root.state = "Swapped"; else root.state = "";}
41     }
42 }