Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qmlvisual / qdeclarativeflickable / flickable-horizontal.qml
1 import QtQuick 1.0
2
3 Rectangle {
4     color: "lightSteelBlue"
5     width: 600; height: 300
6
7     ListModel {
8         id: list
9         ListElement { dayColor: "steelblue" }
10         ListElement { dayColor: "blue" }
11         ListElement { dayColor: "yellow" }
12         ListElement { dayColor: "purple" }
13         ListElement { dayColor: "red" }
14         ListElement { dayColor: "green" }
15         ListElement { dayColor: "orange" }
16     }
17
18     Flickable {
19         id: flickable
20         anchors.fill: parent; contentWidth: row.width
21
22         Row {
23             id: row
24             Repeater {
25                 model: list
26                 Rectangle { width: 200; height: 300; color: dayColor }
27             }
28         }
29     }
30     Rectangle {
31         radius: 3
32         y: flickable.height-8
33         height: 8
34         x: flickable.visibleArea.xPosition * flickable.width
35         width: flickable.visibleArea.widthRatio * flickable.width
36     }
37 }