aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/doc/snippets/qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/doc/snippets/qml')
-rw-r--r--src/quick/doc/snippets/qml/listview/listview.qml9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/quick/doc/snippets/qml/listview/listview.qml b/src/quick/doc/snippets/qml/listview/listview.qml
index c8df8e727b..611f590542 100644
--- a/src/quick/doc/snippets/qml/listview/listview.qml
+++ b/src/quick/doc/snippets/qml/listview/listview.qml
@@ -13,6 +13,8 @@ ListView {
model: ContactModel {}
delegate: Text {
+ required property string name
+ required property string number
text: name + ": " + number
}
}
@@ -25,10 +27,13 @@ Rectangle {
Component {
id: contactDelegate
Item {
+ id: myItem
+ required property string name
+ required property string number
width: 180; height: 40
Column {
- Text { text: '<b>Name:</b> ' + name }
- Text { text: '<b>Number:</b> ' + number }
+ Text { text: '<b>Name:</b> ' + myItem.name }
+ Text { text: '<b>Number:</b> ' + myItem.number }
}
}
}