Doc: QPersistentModelIndex cannot be stored in a QStandardItem

As discussed in the bug report, making sure that the reference counts
are correct in such scenarios adds substantial complexity to the code,
only to support a bad use-case for which QStandardItemModel was not
designed.

Change-Id: I663b490ed3471875386add17e7eadb7d8df50489
Fixes: QTBUG-78142
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This commit is contained in:
Volker Hilsheimer 2020-01-30 17:37:09 +01:00
parent eb45c37be7
commit ef7773e566

View File

@ -107,6 +107,9 @@ void QPersistentModelIndexData::destroy(QPersistentModelIndexData *data)
It is good practice to check that persistent model indexes are valid
before using them.
\note You cannot store a QStandardItemModel's QPersistentModelIndex
in one of the model's items.
\sa {Model/View Programming}, QModelIndex, QAbstractItemModel
*/