[PyQt] segfault when using a proxy and SIGNAL( "clicked(QModelIndex)" )

Darren Dale dsdale24 at gmail.com
Mon Apr 13 15:27:56 BST 2009


Hi Andreas,

On Mon, Apr 13, 2009 at 9:58 AM, Andreas Pakulat <apaku at gmx.de> wrote:

> On 13.04.09 14:11:46, Arnold Krille wrote:
> > It is a pointer for internal purposes, that is internal for the model
> > so it can map indexes to the internal data structures. (And yes, that
> > is needed for anything except simple list or table models.:)
>
> <nitpick>Thats not true actually, you can create the most complex model
> imaginable without using the internalPointer, simply by using the
> internalId and the related createIndex overload. That also automatically
> solves any problems created by python's refcounting+garbage collection
> (if you forget to store a reference to an object for the model in your
> model)
>

Could you please sugggest an example of this approach, if you know of one? I
started a thread on March 10 on this mailing list ("seeking advice on why
this script segfaults") where I put together an unsatisfying work around to
avoid segfaults that were probably caused by my use of internalPointer.

Thanks,
Darren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090413/13b66cb9/attachment.html


More information about the PyQt mailing list