[PyQt] QModelIndex.internalPointer

Phil Thompson phil at riverbankcomputing.com
Sun May 22 10:42:38 BST 2011

On Sun, 22 May 2011 02:23:35 +0200, "Hans-Peter Jansen" <hpj at urpla.net>
> On Wednesday 18 May 2011, 16:03:59 Andrei Kopats wrote:
>> Here is example.
>> Unfortunately, with it I can reproduce crash only if reference to
>> integer was passed to createIndex()
>> In the attachment you can find test script, and execution log. The
>> log also contains my system info.
> Confirmed, and from what I can see, this should not happen.
> Mind converting it to C++, and posting code and results here, just to 
> exclude an Qt issue?

It's working as intended. If you pass an int then it is assumed that this
is a memory address, otherwise it is assumed to be a borrowed reference to
a Python object.

If you want an int to be interpreted differently then wrap it in a class.


More information about the PyQt mailing list