diff options
Diffstat (limited to 'src/quick/doc/snippets/qml/models')
| -rw-r--r-- | src/quick/doc/snippets/qml/models/views-models-delegates.qml | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/quick/doc/snippets/qml/models/views-models-delegates.qml b/src/quick/doc/snippets/qml/models/views-models-delegates.qml index 8a2f0519d6..39b54af3ef 100644 --- a/src/quick/doc/snippets/qml/models/views-models-delegates.qml +++ b/src/quick/doc/snippets/qml/models/views-models-delegates.qml @@ -26,10 +26,19 @@ Rectangle { Component { id: fruitDelegate Row { - id: fruit - Text { text: " Fruit: " + name; color: fruit.ListView.view.fruit_color } - Text { text: " Cost: $" + cost } - Text { text: " Language: " + fruit.ListView.view.model.language } + id: fruit + required property string name + required property real cost + Text { + text: " Fruit: " + fruit.name + color: fruit.ListView.view.fruit_color + } + Text { + text: " Cost: $" + fruit.cost + } + Text { + text: " Language: " + fruit.ListView.view.model.language + } } } |
