[PyQt] QPersistentModelIndex problem

Roberto Alsina ralsina at kde.org
Sat Feb 7 03:32:12 GMT 2009

I am trying to inherit QAbstractItemModel and am having problems implementing 

In order to do it correctly to represent a tree structure, I am storing a 
QPersistentModelIndex in my tree node.

However, parent needs to return a plain QModelIndex.

AFAICS, this is how you convert:

QPersistentModelIndex::operator const QModelIndex & () const

Cast operator that returns a const QModelIndex&.

But how can I do that from python?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090207/1e0ccc6f/attachment.html

More information about the PyQt mailing list