Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
mistralegna last edited by mistralegna
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 ![
Yes it will, QFileSystemModel handles that automatically
mistralegna last edited by
Thanks for your answer !