[PyQt] PyQt createIndex question

Doug Nichols doug16 at gmail.com
Sun Sep 14 14:01:49 BST 2008


Yea, but the C++ equivalent also doesn't do GC, I was reling on the Python
GC to do my memory management for me.  Bad/Lazy programming style.  I'll
look into the dictionary concept.  I just need to determine when to clear
the dictionary, because the Indices created were thrown away.  I assume it
would be whenever a layoutChanged() signal is emitted?

Thanks,
Doug

On Sun, Sep 14, 2008 at 5:49 AM, Andreas Pakulat <apaku at gmx.de> wrote:

> On 13.09.08 23:23:42, Doug Nichols wrote:
> > Does the QAbstractModelIndex.createIndex() function increment the
> reference
> > count for python objects passed into the internal pointer parameter?  It
> > appears that it does not.  If it does not, is it supposed to?
>
> I think the answer is no to both. The C++ equivalent also doesn't manage
> the pointer passed into createIndex.
>
> BTW: At least in the past its been easier to keep a dict of the
> underlying data objects with their id() as key and then use just the id
> for createIndex.
>
> Andreas
>
> --
> Try to get all of your posthumous medals in advance.
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>



-- 
Doug Nichols
doug16 at gmail.com
http://dnwnichols.home.comcast.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20080914/bb8d0bef/attachment.html


More information about the PyQt mailing list