[PyQt] using QPersistentModelIndex in a dictionary?

Erick Tryzelaar idadesub at users.sourceforge.net
Wed Oct 1 02:41:32 BST 2008


I noticed that while QModelIndexes are hash to the same value, it
seems that QPersistentModelIndexes do not:

>>> a=QPersistentModelIndex()
>>> b=QPersistentModelIndex()
>>> hash(a)
46912496540400
>>> hash(b)
46912496540536

Can this be added? Also, it'd be even neater if the hash equaled
QModelIndexes so that we could search a dict using either of them.


More information about the PyQt mailing list