aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qsglistview/data/listview-initCurrent.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qsglistview/data/listview-initCurrent.qml')
-rw-r--r--tests/auto/declarative/qsglistview/data/listview-initCurrent.qml13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/declarative/qsglistview/data/listview-initCurrent.qml b/tests/auto/declarative/qsglistview/data/listview-initCurrent.qml
index ee1a333de0..c4f1860eda 100644
--- a/tests/auto/declarative/qsglistview/data/listview-initCurrent.qml
+++ b/tests/auto/declarative/qsglistview/data/listview-initCurrent.qml
@@ -1,7 +1,12 @@
import QtQuick 2.0
Rectangle {
+ id: root
+
property int current: list.currentIndex
+ property bool showHeader: false
+ property bool showFooter: false
+
width: 240
height: 320
color: "#ffffff"
@@ -36,6 +41,12 @@ Rectangle {
}
}
]
+
+ Component {
+ id: headerFooter
+ Rectangle { height: 30; width: 240; color: "blue" }
+ }
+
ListView {
id: list
objectName: "list"
@@ -47,5 +58,7 @@ Rectangle {
delegate: myDelegate
highlightMoveSpeed: 1000
model: testModel
+ header: root.showHeader ? headerFooter : null
+ footer: root.showFooter ? headerFooter : null
}
}