summaryrefslogtreecommitdiffstats
path: root/examples/quick/controls/gallery/content/ModelView.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/controls/gallery/content/ModelView.qml')
-rw-r--r--examples/quick/controls/gallery/content/ModelView.qml9
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/quick/controls/gallery/content/ModelView.qml b/examples/quick/controls/gallery/content/ModelView.qml
index e733793bd..5bbb34f4f 100644
--- a/examples/quick/controls/gallery/content/ModelView.qml
+++ b/examples/quick/controls/gallery/content/ModelView.qml
@@ -67,7 +67,7 @@ Item {
id: dummyModel
Component.onCompleted: {
for (var i = 0 ; i < 100 ; ++i) {
- append({"title": "A title " + i, "imagesource" :"http://someurl.com", "credit" : "N/A"})
+ append({"index": i, "title": "A title " + i, "imagesource" :"http://someurl.com", "credit" : "N/A"})
}
}
}
@@ -77,6 +77,13 @@ Item {
anchors.fill: parent
TableViewColumn {
+ role: "index"
+ title: "#"
+ width: 36
+ resizable: false
+ movable: false
+ }
+ TableViewColumn {
role: "title"
title: "Title"
width: 120