Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
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 endResetModel().
beginResetModel()
endResetModel()