summaryrefslogtreecommitdiffstats
path: root/examples/declarative/tutorials/samegame/samegame3/Block.qml
blob: dd0fb487b2f12760718801069bb0e75c1af25284 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//![0]
import Qt 4.7

Item { 
    id: block

    property int type: 0
    
    Image {
        id: img

        anchors.fill: parent
        source: {
            if (type == 0)
                return "../shared/pics/redStone.png";
            else if (type == 1) 
                return "../shared/pics/blueStone.png";
            else
                return "../shared/pics/greenStone.png";
        }
    }
}
//![0]