[PyQt] memory corruption storing python objects in a QModelIndex with createIndex

Erick Tryzelaar idadesub at users.sourceforge.net
Wed Oct 1 04:04:05 BST 2008


I've been trying to store classes in a QModelIndex using createIndex,
and glib keeps complaining about memory corruption. Since I'm not
doing anything else that complex, I figure that createIndex may be the
culprit. I noticed that the createIndex wrapper function in
sip/QtCore/qabstractitemmodel.sip doesn't have the /Transfer/
directive:

    QModelIndex createIndex(int arow, int acolumn, SIP_PYOBJECT adata = 0) const

Could this possibly be the source of my trouble?


More information about the PyQt mailing list