[Qt5-feedback] Add internalVariant to QModelIndex

Charley Bay charleyb123 at gmail.com
Tue Jul 12 17:27:38 CEST 2011


>
> 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.
>

My guess is that two QModelIndex instances are created referencing the same
instance, but created in two ways:

   ... reinterpret_cast<void*>(&my_base) ...
   ... reinterpret_cast<void*>(&my_derived) ...

In this case, even though they reference the same instance (of MyDerived,
derived from MyBase), the Q_ASSERT_X() would fail because the void* versions
are different.

In my case, the objects don't share a common base class, so I need something
beyond the void* itself.

--charley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt5-feedback/attachments/20110712/f7575833/attachment.html 


More information about the Qt5-feedback mailing list