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. QFile and QDir equivalent in QML

QFile and QDir equivalent in QML

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 6.5k Views
  • 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
    moo1
    wrote on last edited by
    #1

    Is there any specific reason those don't exist?

    1 Reply Last reply
    0
    • B Offline
      B Offline
      blam
      wrote on last edited by
      #2

      QFile support seems unlikely since file reading/writing would be most efficiently done in C++.

      In terms of support for reading the contents of directories, currently there is "FolderListModel":http://doc.qt.nokia.com/4.7-snapshot/src-imports-folderlistmodel.htmlFolderListModel (part of the experimental Qt.labs.folderlistmodel module) which can be used to display directory listings. This has also been discussed here: http://developer.qt.nokia.com/forums/viewthread/3460/

      1 Reply Last reply
      0
      • M Offline
        M Offline
        moo1
        wrote on last edited by
        #3

        Thanks for the link. that's useful for some cases.

        So, maybe not exact exposure of QFile to QML, but how about more high level file access?

        It's perhaps right that C++ is more efficient, but to me it doesn't necessarily justify not to have any kind of local file access API in QML. Also, if efficiency is important I probably use some database system instead of raw file system.

        1 Reply Last reply
        0
        • B Offline
          B Offline
          blam
          wrote on last edited by
          #4

          Yes, maybe some sort of high level file access would be useful. What sort of access are you thinking about? Things like getting the file name and permissions for a file?

          (Also, if you have some concrete ideas in mind it might be useful to file a suggestion at bugreports.qt.nokia.com so that they can be considered for future API additions.)

          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