Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativelistview / data / footer.qml
1 import QtQuick 1.0
2
3 Rectangle {
4     function changeFooter() {
5         list.footer = footer2
6     }
7     width: 240
8     height: 320
9     color: "#ffffff"
10     Component {
11         id: myDelegate
12         Rectangle {
13             id: wrapper
14             objectName: "wrapper"
15             height: 20
16             width: 240
17             Text {
18                 text: index
19             }
20             color: ListView.isCurrentItem ? "lightsteelblue" : "white"
21         }
22     }
23     ListView {
24         id: list
25         objectName: "list"
26         focus: true
27         width: 240
28         height: 320
29         model: testModel
30         delegate: myDelegate
31         footer: Text { objectName: "footer"; text: "Footer"; height: 30 }
32     }
33
34     Component {
35         id: footer2
36         Text { objectName: "footer2"; text: "Footer 2"; height: 20 }
37     }
38 }