QAbstractItemModel: How to signal major change?
Hello,
If I’ve got a QAbstractItemModel based hierarchal model, and I need to make significant changes to it’s structure at run time, what functions do I need to call to alert the view before and after the change?
(Rows would need to be added, removed, and relocated at the same time. Columns would not change.)
Since, I don’t see any generic beginModelReorganization() and endModelReorganization() calls, what is the correct procedure?
Is it just beginResetModel()/endResetModel() to completely clear any viewer state?
Thank you
2 replies
You should call QAbstractItemModel::beginResetModel() [doc.qt.nokia.com] and QAbstractItemModel::endResetModel() [doc.qt.nokia.com]
You must log in to post a reply. Not a member yet? Register here!


