diff options
author | Sukhyun Kim <sukhyun.kim@nokia.com> | 2012-06-13 13:47:28 +0900 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-20 06:04:01 +0200 |
commit | 7c962ceba942f3adf2a77424d73504608a6fceac (patch) | |
tree | 9805ed49c79686dcc4583d7bd2cc39cecb60d2f0 /src/quick/doc/snippets | |
parent | 369423f7410dfa855b96c559603e4c75a3a22256 (diff) |
Update example in a doc.
There are "TypeError" errors.
When using ListView.view in a delegate, the id of child of delegate has to
attach in front of ListView.view to access the model and its properties in this case.
Change-Id: I4610f1fc8b0d085f7cba137e76e0578be7b51e23
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'src/quick/doc/snippets')
-rw-r--r-- | src/quick/doc/snippets/qml/models/views-models-delegates.qml | 5 |
1 files changed, 3 insertions, 2 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 e9f872578f..671d6c7ab8 100644 --- a/src/quick/doc/snippets/qml/models/views-models-delegates.qml +++ b/src/quick/doc/snippets/qml/models/views-models-delegates.qml @@ -63,9 +63,10 @@ Rectangle { Component { id: fruitDelegate Row { - Text { text: " Fruit: " + name; color: ListView.view.fruit_color } + id: fruit + Text { text: " Fruit: " + name; color: fruit.ListView.view.fruit_color } Text { text: " Cost: $" + cost } - Text { text: " Language: " + ListView.view.model.language } + Text { text: " Language: " + fruit.ListView.view.model.language } } } |