summaryrefslogtreecommitdiffstats
path: root/examples/declarative/tic-tac-toe/content/TicTac.qml
blob: eb80743947bf791b5a836da85c49ca492d705d02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import Qt 4.6

Item {
    signal clicked

    states: [
        State { name: "X"; PropertyChanges { target: image; source: "pics/x.png" } },
        State { name: "O"; PropertyChanges { target: image; source: "pics/o.png" } }
    ]

    Image {
        id: image
        anchors.centerIn: parent
    }

    MouseRegion {
        anchors.fill: parent
        onClicked: parent.clicked()
    }
}