summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/visual/flickable/flickable.qml
blob: 24931de8cbfd756d0df182f6fe73b2f4c6e8bf3b (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import Qt 4.6

Rect {
    color: "lightSteelBlue"
    width: 600
    height: 300
    ListModel {
        id: List
        ListElement {
            name: "Sunday"
            dayColor: "#808080"
        }
        ListElement {
            name: "Monday"
            dayColor: "blue"
        }
        ListElement {
            name: "Tuesday"
            dayColor: "yellow"
        }
        ListElement {
            name: "Wednesday"
            dayColor: "purple"
        }
        ListElement {
            name: "Thursday"
            dayColor: "blue"
        }
        ListElement {
            name: "Friday"
            dayColor: "green"
        }
        ListElement {
            name: "Saturday"
            dayColor: "orange"
        }
    }
    Flickable {
        id: Flick
        anchors.fill: parent
        viewportWidth: Lay.width
        HorizontalLayout {
            id: Lay
            Repeater {
                dataSource: List
                Component {
                    Day {
                        day: name
                        color: dayColor
                    }
                }
            }
        }
    }
}