[PyKDE] Multiple inheritance.

Toby Sargeant Toby.Sargeant at fulcrum.com.au
Tue Dec 7 13:55:58 GMT 1999


On Mon, Dec 06, 1999 at 11:12:51PM +0000, Phil Thompson wrote:
> I don't think it's fixable.  The calls to the QObject and QPixmap ctors
> are both creating C++ instances - and the first one created is being
> forgotten.
> 
> If you really needed to do this you would have to create A and B as C++
> classes in a separate library - and then use SIP to generate bindings
> for that library.

Could you make the mapping between Python objects and C++ objects keyed off
python object ptr + python class ptr? It doesn't seem to me to be a problem
having two C++ instances lying about (except possibly for problems with object
lifetime; but that's not much hairier than it is normally). The only issue as I
see it is how you find out which C++ object supports the method call/attribute
access made from python.

Toby.





More information about the PyQt mailing list