summaryrefslogtreecommitdiffstats
path: root/demos/declarative/flickr/common/LikeOMeter.qml
blob: 5ee048b8cda21987f9d4e65b9c12e637bb2227e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import Qt 4.6

Item {
    id: container

    property int rating: 2

    Row {
        Star {
            rating: 0
            onClicked: { container.rating = rating }
            on: container.rating >= 0
        }
        Star {
            rating: 1
            onClicked: { container.rating = rating }
            on: container.rating >= 1
        }
        Star {
            rating: 2
            onClicked: { container.rating = rating }
            on: container.rating >= 2
        }
        Star {
            rating: 3
            onClicked: { container.rating = rating }
            on: container.rating >= 3
        }
        Star {
            rating: 4
            onClicked: { container.rating = rating }
            on: container.rating >= 4
        }
    }
}