Can't delete a local file after loading it using XMLListModel on windows 7
-
Hi, it seems XMLListModel loads entire file into memory so we can't delete it after showing it (just on windows 7, works fine on linux) !
I tried to put ListView,XMLListModel and Delegate on page1.qml and load it using Loader Element on page2.qml,after pressing delete button and assigning Loader Element source = "" to unload it, it seems the loaded file is still in memory and locked so i can't delete it (i mean the file)! :(
AnyIdea ?
-
ok! :p it seems there is no way !
Anyway if you had same problem you should use RoleItemModel and read XML file and make a Model on C++ side.
What is RoleItemModel ?
It provides lower level of pain than the other mechanisms for pushing your data to QML: Custom subclass of QAbstractItemModel and QList<QObject*>."http://www.developer.nokia.com/Community/Wiki/Using_QStandardItemModel_in_QML":http://www.developer.nokia.com/Community/Wiki/Using_QStandardItemModel_in_QML