summaryrefslogtreecommitdiffstats
path: root/examples/declarative/tutorials/samegame/samegame3/Block.qml
blob: 7620104f525979a49c943288b6be75132e221eda (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){
                "../shared/pics/redStone.png";
            } else if(type == 1) {
                "../shared/pics/blueStone.png";
            } else {
                "../shared/pics/greenStone.png";
            }
        }
        anchors.fill: parent
    }
}
//![0]