[Qt-interest] QModelIndex problems to represent a given data structure
Scott Aron Bloom
Scott.Bloom at onshorecs.com
Tue Jul 6 07:51:11 CEST 2010
No.. not at all.. it's a hack I would only use on a 64 bit system, where I wanted to use an internal id qint64 in the createIndex.
But since it only takes 32, there is no way to set it.
Scott
-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Andre Somers
Sent: Monday, July 05, 2010 10:42 PM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] QModelIndex problems to represent a given data structure
Op 5-7-2010 23:04, Scott Aron Bloom schreef:
>
> What I have done in the past, in order to get 64 bits, simply use Model::createIndex( r,c, void*) using a reinterpret_cast< void *>( data ) on your 64 bit data.
>
> Then you simply use internalId to get the value back. The data is stored as a void * internally...
>
>
Is that safe to do on a 32 bits system? I thought that there void* is 32
bits, but perhaps I miss something here.
André
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list