PDA

View Full Version : Append items to listview through QDeclarativeListProperty



petermcg
18th February 2011, 08:24
Hello,

I use QDeclarativeListProperty to expose a list of strings to a QML file. The items are laid out using a ListView, with the QDeclarativeListProperty set as the ListView's model. If I populate the list in C++ before displaying the QML then everything's fine. However, if I try to change the list content during runtime, say by appending or removing items from the list in C++, the changes aren't reflected in the ListView. What can I do to fix this?