aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/models/objectlistmodel/view.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/models/objectlistmodel/view.qml')
-rw-r--r--examples/quick/models/objectlistmodel/view.qml8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/quick/models/objectlistmodel/view.qml b/examples/quick/models/objectlistmodel/view.qml
index d9a32aff14..ba0c905e1e 100644
--- a/examples/quick/models/objectlistmodel/view.qml
+++ b/examples/quick/models/objectlistmodel/view.qml
@@ -53,13 +53,15 @@ import QtQuick 2.0
//![0]
ListView {
width: 100; height: 100
+ required model
- model: myModel
delegate: Rectangle {
+ required color
+ required property string name
+
height: 25
width: 100
- color: model.modelData.color
- Text { text: name }
+ Text { text: parent.name }
}
}
//![0]