Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[SOLVED] QFileSystemModel
-
Hello !
Just a little question to be sure of what I'am doing.
I have a tree view, with a QFileSystemModel. When I want to remove the model in order to have an empty tree view, is the code below sufficient ? I mean, am I sure that all the items of the model are correctly deleted ?
QAbstractItemModel* model = treeView->model(); model->reset(); model->deleteLater();
Thanks for your answers ![
-
Hi,
Yes it will, QFileSystemModel handles that automatically
-
Thanks for your answer !