summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorKavindra Devi Palaraja <kavindra.palaraja@nokia.com>2009-08-21 12:31:32 (GMT)
committerKavindra Devi Palaraja <kavindra.palaraja@nokia.com>2009-08-21 12:36:25 (GMT)
commite866577453334f528fdf289ab825af1911586e47 (patch)
tree0a0f80b994e2fcc72496f661a601621e8f81d6e2 /src/corelib/kernel
parent508b447075fb852e61ddf88c92c9099dad292747 (diff)
downloadQt-e866577453334f528fdf289ab825af1911586e47.zip
Qt-e866577453334f528fdf289ab825af1911586e47.tar.gz
Qt-e866577453334f528fdf289ab825af1911586e47.tar.bz2
Doc - Clarified the use of layoutChanged() in relation to persistent
model indexes Reviewed-By: Olivier Goffart Task: 231608
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qabstractitemmodel.cpp11
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()