Hi,

On Tue, Jul 12, 2011 at 1:29 PM, Harald Fernengel
<[email protected]> wrote:
> The QModelIndex is volatile and short-lived

Isn't a QModelIndex stored as part of e.g. QPersistentModelIndex or
the itemview's private data (QTreeViewItem)? So it is not necessarily
short-lived at all.

> so you can let it point to a
> QVariant that is stored in your internal data structure.

If the API that I must wrap allows me to do this, fine. If not, I'm
forced to pretty much duplicate an existing model with objects that
internalPointer can point to.

> That would require a non-trivial constructor, copy constructor and destructor
> for QModelIndex, which we tried to prevent for performance reasons.

This was a good reason six years ago, but you're selling Qml to people now ;-)

However I can understand your objections.

Nils
_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback

Reply via email to