[PyQt] QModelIndex.internalPointer() is a weak reference

Giraudon Cyril cyril.giraudon at free.fr
Thu Oct 13 16:50:14 BST 2011


Hi,

I am writing a tool based upon a ZODB database. Objects are
hierarchically organized and
can be browsed/modified/added from a tree-like widget.
So I decided to use the QTreeView/QModelIndex components to perform this
task.

All works very well but when ZODB seems to be reset its cache (a lot of
objects are added at once), QModelIndex references are lost and
exceptions are raised.

I 've found the message
http://www.riverbankcomputing.com/pipermail/pyqt/2009-January/021579.html on
the web and I think my issue is linked to this "feature". QModelIndex
doesn't inform ZODB it uses some of the cached objects, and ZODB
cleans/resets its cache.

I'd like to know if this feature is changed in my configuration or if
not, what is the version of PyQt the change is planed ?

Thank you very much,

Cyril.


My configuration is as follows :
PYQT_VERSION_STR : 4.7.2
QT_VERSION_STR : 4.6.2
OS : Linux Ubuntu 10.04 x64




More information about the PyQt mailing list