[PyKDE] Re: QAbstractItemModel 64 bit problem
Jeremy Sanders
jeremy at jeremysanders.net
Tue Sep 26 12:16:58 BST 2006
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 at jeremysanders.net>
http://www.jeremysanders.net/ Cambridge, UK
Public Key Server PGP Key ID: E1AAE053
More information about the PyQt
mailing list