aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/views/listview/displaymargin.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/views/listview/displaymargin.qml')
-rw-r--r--examples/quick/views/listview/displaymargin.qml5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/quick/views/listview/displaymargin.qml b/examples/quick/views/listview/displaymargin.qml
index e0024e72a9..19261caaa6 100644
--- a/examples/quick/views/listview/displaymargin.qml
+++ b/examples/quick/views/listview/displaymargin.qml
@@ -68,10 +68,13 @@ Item {
width: parent.width
height: 25
color: index % 2 ? "steelblue" : "lightsteelblue"
+
+ required property int index
+
Text {
anchors.centerIn: parent
color: "white"
- text: "Item " + (index + 1)
+ text: "Item " + (parent.index + 1)
}
}
}