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

Item { 
    id:block
    property int type: 0
    
    Image { id: img
        source: {
            if(type == 0){
                "pics/redStone.png";
            } else if(type == 1) {
                "pics/blueStone.png";
            } else {
                "pics/greenStone.png";
            }
        }
        anchors.fill: parent
    }
}
//![0]