Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativelistview / data / headerfooter.qml
1 import QtQuick 1.1
2
3 ListView {
4     id: view
5     property bool horizontal: false
6     property bool rtl: false
7     width: 240
8     height: 320
9     
10     orientation: horizontal ? ListView.Horizontal : ListView.Vertical
11     header: Rectangle {
12         objectName: "header"
13         width: horizontal ? 20 : view.width
14         height: horizontal ? view.height : 20
15         color: "red"
16     }
17     footer: Rectangle {
18         objectName: "footer"
19         width: horizontal ? 30 : view.width
20         height: horizontal ? view.height : 30
21         color: "blue"
22     }
23 //    model: testModel
24     delegate: Text { width: 30; height: 30; text: index + "(" + x + ")" }
25     layoutDirection: rtl ? Qt.RightToLeft : Qt.LeftToRight
26 }