diff options
Diffstat (limited to 'src/corelib/kernel/qabstractitemmodel.cpp')
-rw-r--r-- | src/corelib/kernel/qabstractitemmodel.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp index 17af60d..3b7059b 100644 --- a/src/corelib/kernel/qabstractitemmodel.cpp +++ b/src/corelib/kernel/qabstractitemmodel.cpp @@ -1216,7 +1216,16 @@ void QAbstractItemModelPrivate::columnsRemoved(const QModelIndex &parent, layoutChanged() after changing the layout. Subclasses should update any persistent model indexes before emitting - layoutChanged(). + layoutChanged(). In other words, when the structure changes: + + \list + \o Call beginLayoutChanged() + \o Remember the QModelIndex that will change + \o Update your internal data + \o Call changePersistentIndex() + \o Call endLayoutChanged() + \endlist + \sa layoutAboutToBeChanged(), dataChanged(), headerDataChanged(), reset(), changePersistentIndex() |