[PyQt] QModelIndex.internalPointer

Hans-Peter Jansen hpj at urpla.net
Sun May 22 21:17:10 BST 2011

On Sunday 22 May 2011, 11:42:38 Phil Thompson wrote:
> On Sun, 22 May 2011 02:23:35 +0200, "Hans-Peter Jansen"
> <hpj at urpla.net>
> wrote:
> > 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.

Okay, that makes sense. Thanks for the clarification.

I would have supplied a doc patch for this matter, but couldn't locate 
the doc source. Guess, it is generated from the Qt docs directly..


More information about the PyQt mailing list