[PyQt] Help needed with SIP

Vipul Raheja vipul.iiith at gmail.com
Sat Aug 6 16:15:19 BST 2011


Hi all,

I am trying to wrap the Qt module of OSSIM, an image-processing tool. I was
just beginning to dive into the wrapping process and created a .sip file to
wrap a class, ossimPlanetQtAboutDialog. But I am getting the following error
on executing the sip command:

vipul at vipul-laptop:~/ossim-svn/src/pyossim/sip$ sip -I /usr/include/qt4 -c .
pyossim.sip
sip: /usr/include/qt4/QtGui/QWidget:1: syntax error

Here is the file ossimPlanetAboutDialog.h that I am trying to wrap:
------------------------------------------------------------------------------------------------
#ifndef ossimPlanetAboutDialog_HEADER
#define ossimPlanetAboutDialog_HEADER
#include <QtGui/QDialog>
#include <ossimPlanetQt/ui_ossimPlanetQtAboutDialog.h>
#include <ossimPlanetQt/ossimPlanetQtExport.h>

class OSSIMPLANETQT_DLL ossimPlanetQtAboutDialog :  public QDialog, public
Ui::ossimPlanetQtAboutDialog
{
public:
    ossimPlanetQtAboutDialog(QWidget* parent);
};

#endif
------------------------------------------------------------------------------------------------


Here is the file pyossim.sip that I am trying to compile:
------------------------------------------------------------------------------------------------
%Module pyossim 0

%Import QtGui/QWidget
%Import QtGui/QDialog

class ossimPlanetQtAboutDialog : QDialog
{

%TypeHeaderCode
#include <ossimPlanetQt/ui_ossimPlanetQtAboutDialog.h>
#include <ossimPlanetQt/ossimPlanetQtAboutDialog.h>
%End

public:
        ossimPlanetQtAboutDialog (QWidget *parent /TransferThis/ = 0);
};
------------------------------------------------------------------------------------------------

Kindly help.

Thanks and regards,
Vipul Raheja
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110806/d00a828f/attachment.html>


More information about the PyQt mailing list