[PyQt] Wrap C++ classes using SIP

Jayesh Chaudhary aashishcy at gmail.com
Fri May 18 23:13:37 BST 2012


Folks,

I am a newbie to SIP. I am trying to wrap couple of classes and it was
going good till I hit this problem.

So here is my use case:

Lets say I have two classes Foo and Bar. I already have Bar wrapped (not
via SIP though) and now I am trying to wrap Foo using SIP.

My Foo looks like this:

Class Foo: public Bar
{
};


I don't want to wrap Bar again with SIP since this will trigger a chain
reaction. In my SIP I have done something like this:

%Module FooMod

class Foo: Bar
{
%TypeHeaderCode
#include<Foo.h>
%End
...
...
};

But then if I don't wrap Bar, I get Bar undefined. Is there a way around
it?

Many thanks for your help.

Best,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20120518/6ac487f5/attachment.html>


More information about the PyQt mailing list