[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyKDE] Multiple inheritance.
From:       Toby Sargeant <Toby.Sargeant () fulcrum ! com ! au>
Date:       1999-12-07 13:55:58
[Download RAW message or body]

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.



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic