diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2010-08-03 10:53:57 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2010-08-03 10:53:57 (GMT) |
commit | d5491ecdde14659a913c9f476f18c45f1d9489bb (patch) | |
tree | 06cc52249feda9bd9e50ca47abb8ebd676c8a309 /examples/declarative/tutorials/extending/chapter3-bindings/app.qml | |
parent | 42cdfaf86d34afeb6448723839fef70fe477deed (diff) | |
parent | a41128af5373a0225c3548abd3eb82cd7e8f7a0e (diff) | |
download | Qt-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.qml | 42 |
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] |