Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QFileSystemModel not updating on insertion of removable disc
pmh4514 last edited by pmh4514
Using Qt5.5.1 on Win8.1 64bit (MSVC2013), I have a QFileSystemModel attached to a QTreeView.
It works quite well to instantly reflect changes made with Windows like deleting, adding, renaming folders and files:
QTreeView tree = new QTreeView(this); QFileSystemModel dirModel = new QFileSystemModel(this); dirModel->setRootPath(dirModel->myComputer().toString()); tree->setModel(dirModel);
The problem is, if I attach an external USB drive, I'd expect the file-system model to reflect the new drive. But it doesn't. What am I doing wrong?
pmh4514 last edited by
Qt support has informed me that this is a known bug in Windows and there is no solution at this time. A workaround is to destroy and recreate the model.