summaryrefslogtreecommitdiffstats
path: root/examples/declarative/tutorials/extending/chapter2-methods/app.qml
blob: 35e083efc3db088c9bb3e3d791c54034d095a897 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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()
    }
}