View Full Version : ListElement cannot use script for property value in ListElement (QML)

22nd April 2011, 10:20
I am trying to update the values of roles in ListElement.
Here is my Example.qml file


property string title :""
property string tags: ""
property string name: ""


Here is myModel.qml


ListElement{source: myExample.tags }


and here is the main.qml

Rectangle {
width: 600
height: 600
Text {
x: 66
y: 93
text: "Hello World"



What I am not allowed to do above is to use "myExample.tags" as the value of role of a ListElement. The error is the following:

ListElement: cannot use script for property value
ListElement{source: myExample.tags }

Is there any other way to update the roles inside the ListModel?
Is it possible to create a ListModel in C++ and use it in QML as plugin?