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. Using FolderListModel
Qt 6.11 is out! See what's new in the release blog

Using FolderListModel

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qt quickfolderlistmodel
3 Posts 3 Posters 1.7k 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.
  • CharlieGC Offline
    CharlieGC Offline
    CharlieG
    wrote on last edited by
    #1

    Hello,

    I want use Qt.Labs.folderlismodel. I try this :

    FolderListModel {
                id: folderModel
                folder: "file:///home/charlie/Dev"
                //rootFolder: "file:///home/charlie/Dev"
    

    With folder I can show only folders (not files) and rootFolder doesn't works

    Can you help me ?

    Thank you very much.

    Charlie

    1 Reply Last reply
    0
    • C Offline
      C Offline
      clochydd
      wrote on last edited by
      #2

      Hi Charlie,

      you can show the files by using the keyword name

      1 Reply Last reply
      0
      • L Offline
        L Offline
        literA2
        wrote on last edited by
        #3

        @CharlieG setting folder displayed both folders and files on the directory.

        What I did was, I created a ListView and set FolderListModel as its model. Then on delegate item, you can use the folder properties to display the contents.

        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