[PyKDE] Model indexes and internal pointers

Andreas Pakulat apaku at gmx.de
Mon Jul 17 09:15:36 BST 2006


On 16.07.06 12:34:34, Arve Knudsen wrote:
> Phil: Might it be an idea to make QModelIndex update the reference
> count for its "internalPointer"? This is only a suggestion on my part,
> as I'm in not an expert on Python/C++ interfacing. I just resolved
> some mysterious segfaults in an application of mine to a temporary
> Python object being stored in a QModelIndex, and some robustness
> towards this sort of thing in PyQt would be great.

When Phil implemented this and announced it here on the list he clearly
stated that you need to save a reference to the object that you put into
the internalPointer of an index. The sections on the createIndex methods
need this warning, but the docs for PyQt4 are a Work In Progress still.

Andreas

-- 
You are going to have a new love affair.




More information about the PyQt mailing list