From 1eaeed6c566e7666b7c0eb9e7ade7c030ec5de7b Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Fri, 28 Oct 2022 13:20:27 +0200 Subject: [PATCH] Changed root index of file system model to prevent lagging UI if network folders are missing --- demo/MainWindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/demo/MainWindow.cpp b/demo/MainWindow.cpp index a474510..57d5286 100644 --- a/demo/MainWindow.cpp +++ b/demo/MainWindow.cpp @@ -216,6 +216,7 @@ struct MainWindowPrivate QFileSystemModel* m = new QFileSystemModel(w); m->setRootPath(QDir::currentPath()); w->setModel(m); + w->setRootIndex(m->index(QDir::currentPath())); ads::CDockWidget* DockWidget = new ads::CDockWidget(QString("Filesystem %1") .arg(FileSystemCount++)); DockWidget->setWidget(w);