Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-40307

FolderListModel fails to introspect "qrc" files

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 5.3.1
    • None
    • Tested on Ubuntu

    Description

      FolderListModel fails to introspect "qrc" files and lists the current working directory instead.

      import QtQuick 2.2
      import QtQuick.Controls 1.1
      import Qt.labs.folderlistmodel 2.1
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
      
          ListView {
              id: view
              anchors.fill: parent
              width: 400
              height: 400
      
              model: FolderListModel {
                  id: folderModel
                  nameFilters: ["*.txt"]
                  folder: "qrc:///kk"
              }
      
              delegate: Component {
                  id: fileDelegate
                  Rectangle {
                      width: view.width
                      height: 60
                      Text {
                          anchors.centerIn: parent
                          text: fileName
                      }
                  }
              }
          }
      }
      

      According to docs it should work:

      http://qt-project.org/doc/qt-5/qml-qt-labs-folderlistmodel-folderlistmodel.html#folder-prop

      Other users experience this issue as well:

      https://www.mail-archive.com/interest%40qt-project.org/msg12350.html

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            paeglis Gatis Paeglis
            paeglis Gatis Paeglis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes