[PyQt] Problem with implementation of dummy (no-op) proxy model

Hans Meine meine at informatik.uni-hamburg.de
Thu Oct 28 13:28:16 BST 2010


Hi again!

I am about to give up now, but first I want to post my current code again; I 
added some assertions which show an interesting fact which I have no 
explanation for:  One assertion fails, since I am getting a QModelIndex of my 
proxy model in which internalPointer does *not* contain a QModelIndex of the 
proxied model anymore, but NULL/None.

This is very strange, and with persistent QMIs, it crashes completely.

Can you confirm this, or do you know why this is so?

Maybe it is a bug/limitation of PyQt, and QMI's internalPointer() does not 
increment the refcount?  That would explain a lot...

This is with:
python 2.6.5 (release26-maint, Aug 18 2010, 09:33:34)
sip 4.10.5
PyQt4 4.7 (using Qt 4.6.2)

Have a nice day,
  Hans
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dummy_proxy.py
Type: text/x-python
Size: 3904 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20101028/52140539/attachment.py>


More information about the PyQt mailing list