[Qt5-feedback] Add internalVariant to QModelIndex
Nils Jeisecke
njeisecke at saltation.de
Tue Jul 12 17:09:00 CEST 2011
> I don't know what assert you mean here, and I know of nothing in the code
> preventing you from creating two QModelIndexes with different internal
> pointers and referring to the same item. I also know that you can create
> QModelIndexes dynamically and you don't have to keep them around.
see QAbstractItemView::setModel(QAbstractItemModel *model)
// These asserts do basic sanity checking of the model
Q_ASSERT_X(d->model->index(0,0) == d->model->index(0,0),
"QAbstractItemView::setModel",
"A model should return the exact same index "
"(including its internal id/pointer) when asked for it
twice in a row.");
Nils
More information about the Qt5-feedback
mailing list