[PyQt] Wrapping a C++ class with SIP

Vipul Raheja vipul.iiith at gmail.com
Thu Aug 11 20:39:25 BST 2011


Hi,

I was able to remove the error by removing the parent class's name from the
class definition. I am able to run config.py, however, it gives another
error when I run the make.

vipul at vipul-laptop:~/ossim-svn/src/pyossim/sip/current$ python config.py
sip: ossimPlanetQtLegendAnimationPathItem::setAnimationPath() unsupported
function argument type - provide %MethodCode and a valid C++ signature
Error: Unable to open "./pyossim.sbf"

Now, I have been able to find that it demands something to handle osg::
ref_ptr<osg::AnimationPath>
data type.

But the function animationPath() is defined in the
ossimPlanetQtLegendAnimationPathItem.cpp source file as simply returning a
private variable of the same type, osg::ref_ptr<osg::AnimationPath>.

Kindly guide.

Thanks and Regards,
Vipul

On Thu, Aug 11, 2011 at 1:35 AM, Vipul Raheja <vipul.iiith at gmail.com> wrote:

> Hi,
>
> I am facing a problem while wrapping a C++ class with SIP. This class
> inherits another non-standard user-defined class and not the standard Qt
> classes like QLabel etc. as given in the examples. When I try to compile it,
> it gives me the following error:
>
> vipul at vipul-laptop:~/ossim-svn/src/pyossim/sip/current$ python config.py
> sip: ossimPlanetQtLegendItem has not been defined
> Error: Unable to open "./pyossim.sbf"
>
> Here is the class I am trying to wrap: http://paste.debian.net/125806/
> And this is the corresponding SIP file: http://paste.debian.net/125817/
>
> Also, I had another doubt. How do I wrap #ifndef, #define, #endif macro
> definitions using SIP?
>
> Kindly help.
>
> Thanks and Regards,
> Vipul Raheja
>



-- 
*Vipul Raheja*
Senior Undergraduate
Computer Science and Engineering (Dual)
Lab for Spatial Informatics
IIIT Hyderabad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110812/8d0b1378/attachment.html>


More information about the PyQt mailing list