Nils Jeisecke wrote: >> 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
Oh, ok. I thought you meant something different about accessing the actual data. I still don't see why you would want d->model->index(0,0) != d->model- >index(0,0) though and why you think it means you have to keep already created indexes around. I would like to see a minimal or partial implementation which shows that requirement. _______________________________________________ Qt5-feedback mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
