How to clear an XML model after we have read it?
I have an xmlDataModel, and I change the query several times, to read different children in the XML tree.
Since I re-use the same model several times, I think it is important that I clear the xmlModel, before I populate it again.
I have tried:
print("Count of Model: "+objectsModel.count);
while(objectsModel.count > 0)
@qml: Count of Model: 2
qrc:///JsFunctions.js:148: TypeError: Property 'remove' of object QQuickXmlListModel(0x1040c97e0) is not a function@
So how to clear the xmlModel after reading the items from it?
I guess assigning a new source to XmlListModel should remove the old one.