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

QTreeView with QFileSystemModel is incredibly slow

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • 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

        1. 2021-12-31 10-51-53.mkv
          12.05 MB
          Andreas Buhr
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes