[PyQt] Changing base class arguments

Marco Meier marco.meier at ifak.eu
Thu Aug 23 15:37:45 BST 2012


Hi,

i'm trying to wrap a C++ class with virtual methods using SIP. This
class takes an auto_ptr pointing to another class as argument to the
only defined constructor.

Without virtual methods, i used %MethodCode to create an object of this
class using a const char * as argument. With virtual methods, this is
not possible, since the constructor of the base class is called prior to
the constructor.

Is there a way to change the initializer list to something like

sipwrapped_class(const char *a0) :
wrapped_class(some_static_method(a0)), .. {}

or is there another way to do this with SIP?

Thanks,

Marco


More information about the PyQt mailing list