summaryrefslogtreecommitdiffstats
path: root/demos/declarative/flickr/common/LikeOMeter.qml
blob: 17e3998a200d4456922026ca79ccf6d3b5a2574b (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.7

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
        }
    }
}