Phil Thompson wrote: > In fact I could make this work with PyQt so that id() could be used as the > internal ID, but I don't really see the point as... > > idx = a.createIndex(0, 0, data) > assert idx.internalPointer() is data > > ...seems more natural than... > > idx = a.createIndex(0, 0, id(data)) > assert idx.internalId() == id(data) > > ...and both require you to keep a reference elsewhere to data.
True. I switched my code to use internalPointer when I realised it was available. I copied the examples originally, which used id. Jeremy -- Jeremy Sanders <[EMAIL PROTECTED]> http://www-xray.ast.cam.ac.uk/~jss/ X-Ray Group, Institute of Astronomy, University of Cambridge, UK. Public Key Server PGP Key ID: E1AAE053 _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
