[PyQt] sip syntax error
Phil Thompson
phil at riverbankcomputing.com
Tue Sep 19 18:22:44 BST 2017
On 19 Sep 2017, at 5:52 pm, deepak mathur <mathurdeepak13 at gmail.com> wrote:
>
> Hello,
>
> I've been trying to run "python configure.py" with following error:
>
> sip: /job/rnd/dev/people/dmathur/work/sipTest/labelTest/sip/PyMyLabel.sip:1: syntax error
>
> sip command (from configure.py):
> /usr/bin/sip -x VendorID -t WS_X11 -t Qt_5_6_0 -x Py_v3 -I /job/rnd/dev/people/dmathur/work/sipTest/labelTest/sip -I /usr/share/sip/PyQt5 -I /usr/include/python2.6 -I /job/rnd/dev/people/dmathur/work/sipTest/labelTest/src -c /job/rnd/dev/people/dmathur/work/sipTest/labelTest/modules -b /job/rnd/dev/people/dmathur/work/sipTest/labelTest/modules/PyMyLabel.sbf -w /job/rnd/dev/people/dmathur/work/sipTest/labelTest/sip/PyMyLabel.sip
>
>
> PyMyLabel.sip:----
> %Module(name=PyMyLabel, call_super_init=True, keyword_arguments="All")
> %DefaultMetatype PyQt5.QtCore.pyqtWrapperType
> %DefaultSupertype sip.simplewrapper
> %Include MyLabel.sip
>
>
> MyLabel.sip:----
> %Module PyMyLabel 0
>
> %Import QtGui/QtGuimod.sip
> %Import QtWidgets/QtWidgetsmod.sip
>
> %If (Qt_5_0_0 -)
>
> class MyLabel : public QLabel {
>
> %TypeHeaderCode
> #include "mylabel.h"
> %End
>
> public:
> MyLabel(QWidget *parent /TransferThis/ = 0);
>
> private:
> MyLabel(const MyLabel&);
> };
>
> %End
>
>
> I'm not sure what's wrong here.. anyone with similar issue/solution..
Just running...
sip PyMyLabel.sip
...gives me...
sip: Deprecation warning: MyLabel.sip:1: %Module version number should be specified using the 'version' argument
sip: MyLabel.sip:3: Module is already defined
...which is exactly what I would expect.
Check your version of sip.
Phil
More information about the PyQt
mailing list