[PyQt] Bug in QAbstractItemModel::createIndex()?

Andreas Pakulat apaku at gmx.de
Thu Apr 5 01:01:37 BST 2007


the latest eric4 snapshots seem to not work wrt model/view stuff, first
I thought its because they create model indexes using


where item is an instance of a class, however when getting an index the
model always asks it for its internalId() and not the internalPointer().
So I changed it to


which should work, but the created indices don't have a proper
internalId, its always some negative number.

The attached example is the simepltreemodel modified to use internalId
instead of internalPointer and shows the same problem.


Beware of a tall black man with one blond shoe.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simpletreemodel.py
Type: text/x-python
Size: 6025 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20070405/aaf3a1d1/simpletreemodel-0001.py

More information about the PyQt mailing list