opensubscriber
   Find in this group all groups
 
Unknown more information…

p : pykde@mats.imk.fraunhofer.de 26 September 2006 • 7:16PM -0400

[PyKDE] Re: QAbstractItemModel 64 bit problem
by Jeremy Sanders

REPLY TO AUTHOR
 
REPLY TO GROUP




On Tue, 26 Sep 2006, Jeremy Sanders wrote:

> The python Ids appear to be large integer values, e.g. 183006915920, but when
> they are returned from internalId(), then they come back as negative values
> e.g., -1676677808L, which don't even appear to match the bit pattern of the
> original value.

I'm afraid I'm replying to my own posting, but here is a short program to
demonstrate the issue:

---------------------------------------------
from PyQt4.QtCore import *
from PyQt4.QtGui import *

class C(QAbstractItemModel):
     pass

a = C()
i = id(a)
index = a.createIndex(0, 0, i)

print index.internalId(), i
---------------------------------------------

On 32 bit x86 this prints:

-1208606100 -1208606100

On 64 bit x86_64 this prints

-1788599016 182894994712

I couldn't see this mentioned in the mailing list archive.

Jeremy

--
Jeremy Sanders <jeremy@jere...>
http://www.jeremysanders.net/                Cambridge, UK
Public Key Server PGP Key ID: E1AAE053

_______________________________________________
PyKDE mailing list    PyKDE@mats...
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.