From: Sukhyun Kim Date: Wed, 13 Jun 2012 04:47:28 +0000 (+0900) Subject: Update example in a doc. X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=7c962ceba942f3adf2a77424d73504608a6fceac;p=konrad%2Fqtdeclarative.git 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 --- 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 e9f8725..671d6c7 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 } } }