summaryrefslogtreecommitdiffstats
path: root/examples/declarative/tutorials/samegame/samegame3/Block.qml
blob: bb48ac865572efc738e5ee1f69bfb880b3b05190 (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.7

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]