diff options
Diffstat (limited to 'examples/declarative/tutorials/extending/chapter3-bindings/app.qml')
-rw-r--r-- | examples/declarative/tutorials/extending/chapter3-bindings/app.qml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/app.qml b/examples/declarative/tutorials/extending/chapter3-bindings/app.qml new file mode 100644 index 0000000..0460b0b --- /dev/null +++ b/examples/declarative/tutorials/extending/chapter3-bindings/app.qml @@ -0,0 +1,31 @@ +import Music 1.0 +import Qt 4.7 + +Rectangle { + width: 200; height: 200 + + Musician { + id: reddy + name: "Reddy the Rocker" + instrument: "Guitar" + } + + Musician { + id: craig + name: "Craig the Copycat" + instrument: reddy.instrument + } + + MouseArea { + anchors.fill: parent + onClicked: { + reddy.perform() + craig.perform() + + reddy.instrument = "Drums" + + reddy.perform() + craig.perform() + } + } +} |