[PyQt] From object IDs to objects to model indexes...

Dirk Wagener dwagen at stonethree.com
Tue Feb 12 08:43:04 GMT 2008


I am using QModelIndex constructed with an id. I am using the built-in method 
id(my_object) to get an ID to construct a ModelIndex with. 
If we have an index, internalId() returns the id used to create the index. 
Is there a API way to get the ModelIndex from a view if we have the id used 
to create the index? I do not see a method like this in the QModelIndex API. 

Also, id(my_object) = ID. Is there a way to get my_object if I only have the ID? 


Dirk Wagener <dwagen at stonethree.com> 
(MSc. Electronic Engineering, Stell.) 

Project Engineer 
Stone Three Signal Processing (Pty.) Ltd. 
+27 21 851 3123 (phone) 
+27 21 851 3127 (fax) 

Discovery consists of seeing what everybody 
has seen and thinking what nobody has thought. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20080212/348b82d0/attachment.html

More information about the PyQt mailing list