Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Can't delete a local file after loading it using XMLListModel on windows 7
Forum Updated to NodeBB v4.3 + New Features

Can't delete a local file after loading it using XMLListModel on windows 7

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 1 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    maour
    wrote on last edited by
    #1

    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 ?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      maour
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved