aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklistview/data/strictlyenforcerange.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquicklistview/data/strictlyenforcerange.qml')
-rw-r--r--tests/auto/quick/qquicklistview/data/strictlyenforcerange.qml29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicklistview/data/strictlyenforcerange.qml b/tests/auto/quick/qquicklistview/data/strictlyenforcerange.qml
new file mode 100644
index 0000000000..7960ac4abb
--- /dev/null
+++ b/tests/auto/quick/qquicklistview/data/strictlyenforcerange.qml
@@ -0,0 +1,29 @@
+import QtQuick 2.0
+
+ListView {
+ id: list
+ objectName: "list"
+ width: 320
+ height: 480
+
+ function fillModel() {
+ list.model.append({"col": "red"});
+ list.currentIndex = list.count-1
+ list.model.append({"col": "blue"});
+ list.currentIndex = list.count-1
+ list.model.append({"col": "green"});
+ list.currentIndex = list.count-1
+ }
+
+ model: ListModel { id: listModel } // empty model
+ delegate: Rectangle { id: wrapper; objectName: "wrapper"; color: col; width: 300; height: 400 }
+ orientation: "Horizontal"
+ snapMode: "SnapToItem"
+ cacheBuffer: 1000
+
+ preferredHighlightBegin: 10
+ preferredHighlightEnd: 10
+
+ highlightRangeMode: "StrictlyEnforceRange"
+ focus: true
+}