[Qt-qml] Repeater Element and dataSource property

Alan Alpert alan.alpert at nokia.com
Thu May 20 11:50:34 CEST 2010


 Torsdag 20. mai 2010 19:09:35 skrev ext Liebe Markus (RtP2/TEF72) :
> Hi there,
> 
> I am using the QtCreator 2.0 beta along with Qt 4.7 beta.
> I want to use the Repeater Element in a Delegatecomponent for a Listview as
> shown in the Documentation for the ListModel. See the example with the the
> fruit attributes: http://doc.qt.nokia.com/4.7-snapshot/qml-listmodel.html
> 
> The problem is that I always get an error concerning the dataSource
> property of the Repeater element when using this code:
> 
> //---snip------
> Repeater {
>         dataSource: attributes
>         Component { Text { text: description } }
> }
> //---snap------
> 
> The error is:
> file:///tmp/repeater/test.qml:19:21: Cannot assign to non-existent property
> "dataSource" dataSource: attributes
>                          ^
> 
> Is the dataSource property not available in the beta yet? Am I doing sth
> wrong here?
> 

Actually, the dataSource property was renamed to 'model' some time ago, and 
that example you were looking at was out of date.

Thank you for brining this documentation bug to our attention. It has already 
been fixed, and hopefully the correct example with be in the snapshot next time 
it gets rebuilt.

-- 
Alan Alpert
Software Engineer
Nokia, Qt Development Frameworks



More information about the Qt-qml mailing list