summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativegridview/data/gridview-enforcerange.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qdeclarativegridview/data/gridview-enforcerange.qml')
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/gridview-enforcerange.qml56
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativegridview/data/gridview-enforcerange.qml b/tests/auto/declarative/qdeclarativegridview/data/gridview-enforcerange.qml
new file mode 100644
index 0000000..e45c4c3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativegridview/data/gridview-enforcerange.qml
@@ -0,0 +1,56 @@
+import Qt 4.6
+
+Rectangle {
+ width: 240
+ height: 320
+ color: "#ffffff"
+ Component {
+ id: myDelegate
+ Item {
+ id: wrapper
+ objectName: "wrapper"
+ height: 100
+ width: 100
+ Text {
+ text: index
+ }
+ Text {
+ y: 25
+ id: textName
+ objectName: "textName"
+ text: name
+ }
+ Text {
+ y: 50
+ id: textNumber
+ objectName: "textNumber"
+ text: number
+ }
+ Text {
+ y: 75
+ text: wrapper.y
+ }
+ }
+ }
+
+ Component {
+ id: myHighlight
+ Rectangle {
+ color: "lightsteelblue"
+ }
+ }
+
+ GridView {
+ id: grid
+ objectName: "grid"
+ width: 240
+ height: 320
+ model: testModel
+ delegate: myDelegate
+ highlight: myHighlight
+ preferredHighlightBegin: 100
+ preferredHighlightEnd: 100
+ highlightRangeMode: "StrictlyEnforceRange"
+ focus: true
+ }
+}