[PyQt] SIP PyQT compilation issue

Phil Thompson phil at riverbankcomputing.com
Thu Mar 31 09:20:34 BST 2011

On Wed, 30 Mar 2011 15:45:54 -0700, emmanuel_mayssat at lynceantech.com
> Phil,
> %Include -> %Import
> I was so close and yet ... so far ;-)
> Now everything works like a charm...
> Now as I was expecting, if my class inherits another C++ class, then I
> have to sip that class.
> So to sip a what-appear-to-be-simple class may actually be time
> Is there a way to just sip what I want without sip'ing the entire class
> hierachy?
> As a matter of fact, I sip'ed a few classes and am now required to sip
> std::string.
> It seems that for that one I may just need to import something.... but
> what?
> Everything in my /usr/share/sip is for Qt...
> Am I required to sip std::string as in
> http://www.panix.com/~elflord/unix/siptute/index.html ?

You can lie to SIP as much as you want. For example if B is derived from A
in C++ you can tell SIP that it doesn't derive from anything and you won't
get access to any of A's methods from Python. You could even say that B
contained some of A's methods. The main problem area is virtuals (if you
want to expose them) which really have to be in the right class (including
all their reimplementations).


More information about the PyQt mailing list