07a331a4b76dc0f18d86008e9b76861a2da537e8
[profile/ivi/qtdeclarative.git] / tests / auto / quick / qquicklistview / data / headerfooter.qml
1 import QtQuick 2.0
2
3 ListView {
4     id: view
5
6     width: 240
7     height: 320
8
9     model: testModel
10
11     header: Rectangle {
12         objectName: "header"
13         width: orientation == ListView.Horizontal ? 20 : view.width
14         height: orientation == ListView.Horizontal ? view.height : 20
15         color: "red"
16     }
17     footer: Rectangle {
18         objectName: "footer"
19         width: orientation == ListView.Horizontal ? 30 : view.width
20         height: orientation == ListView.Horizontal ? view.height : 30
21         color: "blue"
22     }
23
24     delegate: Text { width: 30; height: 30; text: index + "(" + x + ")" }
25 }