[Qt5-feedback] Add internalVariant to QModelIndex

Stephen Kelly steveire at gmail.com
Tue Jul 12 16:46:19 CEST 2011


Matthias Hörmann wrote:

> The current problem with the design is the fact that there is some
> kind of ASSERT in the code
> that prevents you from using different pointer values in QModelIndex
> instances referencing the
> same item. This means you have to keep your instances around and can
> not generate them
> dynamically.
> 

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.

I suspect a bug in Qt or your model. You'll have to create a minimal 
testcase which hits the assert. That belongs in a bug report then, not in 
this thread.

Thanks,

Steve.




More information about the Qt5-feedback mailing list