QDeclarativeListProperty add item from qml application
is there any why to add item to QDeclarativeListProperty from qml file at run time?
in a loop, for example.
Code:
var i;
for(i = 0 ; i < listOfItems.length ; ++i)
{
listOfItems.append(MyItem {
text:"list"+i
})
}
and listOfItems is the QDeclarativeListProperty list...
i dont want to do it like this:
Code:
listOfItems:
[
MyItem
{
text:"list val1"
},
MyItem
{
text:"list val2"
}
......
Re: QDeclarativeListProperty add item from qml application
Have you by chance found an answer to this? I'm having the same problem and I couldn't find an answer anywhere.
Thanks.