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

QTreeView with QFileSystemModel is incredibly slow

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 6.3.0 Feature Freeze
    • Fix Version/s: None
    • Component/s: Core: Item Models
    • Labels:
      None
    • Platform/s:
      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

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

          Activity

            People

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

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes