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

QFileSystemModel does not work on the virtual resource file system

    XMLWordPrintable

Details

    • macOS

    Description

      I tried browing the virtual resource filesystem using a QFileSystemModel. As with any other path in Qt, I tried prepending a : in front of the filename. So the root of the virtual resource filesystem would be ":/". The below pasted example tries to browse the resources but on my system I get the regular filesystem.

      #include <QApplication>
      #include <QTreeView>
      #include <QFileSystemModel>
      
      int main(int argc, char** argv) 
      {
              QApplication app(argc, argv);
              QFileSystemModel model;
              model.setRootPath(":/");
              QTreeView view; 
              view.setModel(&model);
              view.show();
              return app.exec();
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              cnn Qt Core & Network
              axeljaeger Axel Jäger
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes