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

QTreeView with QFileSystemModel is incredibly slow

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.3.0 Feature Freeze
    • Core: Item Models
    • None
    • Linux/X11

    Description

      I don't know what is at fault here, but browsing the filesystem using a QFileSystemModel displayed in a QTreeView has a noticeable delay after each click. One can also see that items are sorted only after a delay. Something is really strange here.

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

      Attachments

        Activity

          People

            dfaure_kdab David Faure
            andreasbuhr Andreas Buhr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: