[SOLVED] QFileSystemModel
General and Desktop
3
Posts
2
Posters
698
Views
2
Watching
-
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 !