Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Developer
Jaragont
Posts: 7
Registered: ‎09-18-2012
My Device: BB 10
My Carrier: O2

Update Listview XML content in QML

Hello,

I have a listview in QML that uses an XML data model. The problem that I have is that sometimes I make some updates in the XML file of the data model and those changes are not shown in the listview.

Is there any way to notify the listview that the XML has changed?

Thank you in advance!

 

Please use plain text.
New Developer
Jaragont
Posts: 7
Registered: ‎09-18-2012
My Device: BB 10
My Carrier: O2

Re: Update Listview XML content in QML

I found the solution (I do not know if it is the correct one... at least it works):

1-Create a connection (signal/slot) when the xml is modified.
2- In the slot implement the next:
listview.resetDataModel();
listview.setDataModel(xmlData);

I hope it will be useful for someone :smileyhappy:
Please use plain text.