Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
TreeViewModel Clear and new Model
Qt.Jo.Ha last edited by
How do I clear the information in the TreeView Model and create and insert a new model?
The reason I want to do this is because of Crash.
Crash occurs after paintSiblingsRecursive is called recursively ..
Why not fix the crash instead?
Anyway. To replace a model, simply do this:
model = someOtherModel
in JS when you want the model to be replaced. Or, if you are using C++ model, you can call
beginResetModel(), clear all data, then