summaryrefslogtreecommitdiffstats
path: root/examples/declarative/tutorials/extending/chapter3-bindings/app.qml
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2010-08-03 10:53:57 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2010-08-03 10:53:57 (GMT)
commitd5491ecdde14659a913c9f476f18c45f1d9489bb (patch)
tree06cc52249feda9bd9e50ca47abb8ebd676c8a309 /examples/declarative/tutorials/extending/chapter3-bindings/app.qml
parent42cdfaf86d34afeb6448723839fef70fe477deed (diff)
parenta41128af5373a0225c3548abd3eb82cd7e8f7a0e (diff)
downloadQt-d5491ecdde14659a913c9f476f18c45f1d9489bb.zip
Qt-d5491ecdde14659a913c9f476f18c45f1d9489bb.tar.gz
Qt-d5491ecdde14659a913c9f476f18c45f1d9489bb.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into lighthouse
Conflicts: configure
Diffstat (limited to 'examples/declarative/tutorials/extending/chapter3-bindings/app.qml')
-rw-r--r--examples/declarative/tutorials/extending/chapter3-bindings/app.qml42
1 files changed, 22 insertions, 20 deletions
diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/app.qml b/examples/declarative/tutorials/extending/chapter3-bindings/app.qml
index 8bf6ecf..2ff6ae1 100644
--- a/examples/declarative/tutorials/extending/chapter3-bindings/app.qml
+++ b/examples/declarative/tutorials/extending/chapter3-bindings/app.qml
@@ -38,35 +38,37 @@
**
****************************************************************************/
//![0]
-import Music 1.0
+import Charts 1.0
import Qt 4.7
-Rectangle {
- width: 200; height: 200
+Item {
+ width: 300; height: 200
- Musician {
- id: reddy
- name: "Reddy the Rocker"
- instrument: "Guitar"
- }
+ Row {
+ anchors.centerIn: parent
+ spacing: 20
+
+ PieChart {
+ id: chartA
+ width: 100; height: 100
+ color: "red"
+ }
- Musician {
- id: craig
- name: "Craig the Copycat"
- instrument: reddy.instrument
+ PieChart {
+ id: chartB
+ width: 100; height: 100
+ color: chartA.color
+ }
}
MouseArea {
anchors.fill: parent
- onClicked: {
- reddy.perform()
- craig.perform()
-
- reddy.instrument = "Drums"
+ onClicked: { chartA.color = "blue" }
+ }
- reddy.perform()
- craig.perform()
- }
+ Text {
+ anchors { bottom: parent.bottom; horizontalCenter: parent.horizontalCenter; bottomMargin: 20 }
+ text: "Click anywhere to change the chart color"
}
}
//![0]