[PyKDE] Wrapping Poppler Qt4 with SIP

Phil Thompson phil at riverbankcomputing.co.uk
Sat Feb 24 11:46:09 GMT 2007


On Saturday 24 February 2007 11:28 am, Rajeev J Sebastian wrote:
> Hello friends,
>
> I am trying to wrap Poppler Qt4 library with SIP. I hit upon a problem:
>
> When the classes I am wrapping refer to other classes in the same .sip
> file, I get errors like "sip: <class> is undefined". I did not
> understand this error message, since there is no line number provided
> by sip. However, commenting some lines in the .sip file made it go
> away.
>
> I realise this is not an error in SIP, since I can see the very same
> in various PyQt4 .sip files. But, I am not able to see what error I am
> making. Could someone please help me to fix this error ?
>
> Representative examples in the attached .sip file:
>
> line 34 in class TextBox: TextBox *nextWord() const;
> line 116 in class Page: QList<TextBox*> textList() const;
> lines 176-184 in class Document:
>
>     static Document *load(const QString & filePath,
>                   const QByteArray &ownerPassword=QByteArray(),
>                   const QByteArray &userPassword=QByteArray());
>
>
>     Page *page(int index) const;
>
>     Page *page(QString label) const;
>
> ... and others
>
> By commenting those lines, "python configure.py" and "make" works without
> error.

Try being explicit about the scope, ie. Poppler::Page rather than Page.

Phil




More information about the PyQt mailing list