summaryrefslogtreecommitdiffstats
path: root/demos/declarative/phonebrowser/content/LikeOMeter.qml
blob: d928f4868624f97caa8a85ef0f0ea4e843c944d2 (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
Item {
    property var rating : 2

    id: Container
    HorizontalLayout {
        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
        }
    }
}