diff options
Diffstat (limited to 'examples/declarative/tutorials/extending/chapter2-methods/app.qml')
-rw-r--r-- | examples/declarative/tutorials/extending/chapter2-methods/app.qml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/declarative/tutorials/extending/chapter2-methods/app.qml b/examples/declarative/tutorials/extending/chapter2-methods/app.qml new file mode 100644 index 0000000..35e083e --- /dev/null +++ b/examples/declarative/tutorials/extending/chapter2-methods/app.qml @@ -0,0 +1,19 @@ +import Music 1.0 +import Qt 4.7 + +Rectangle { + width: 200; height: 200 + + Musician { + id: aMusician + name: "Reddy the Rocker" + instrument: "Guitar" + + onPerformanceEnded: console.log("The performance has now ended") + } + + MouseArea { + anchors.fill: parent + onClicked: aMusician.perform() + } +} |