[PyQt] SIP with PyQt5 and "A More Complex C++ Example"
Phil Thompson
phil at riverbankcomputing.com
Sat Mar 23 12:05:33 GMT 2019
On 23 Mar 2019, at 11:46 am, bitmap kid <bitmap.kid at gmail.com> wrote:
>
> Bonjour,
>
> I'm trying to make the example "A More Complex C++ Example" given in the documentation. But I'm having trouble with the setDefault function.
>
> Once the sources generated with the sip command, when I compile, the compiler says:
>
> ./siphellocmodule.cpp:438:13: error: "setDefault" was not declared in this scope.
> setDefault (* a0);
>
> Indeed, the siphellocmodule.cpp file refers to the setDefault function but does not include hello.h
>
> Do you have an idea of where the problem is?
>
> Please, note :
> I am using PyQt5 5.12.1 and SIP 4.19.5.
> My project consists of hello.h, hello.cpp and hello.sip files
> My sip command is "sip -t WS_X11 -I /usr/share/sip/PyQt5 -c.hello.sip"
> It generates the following files:
>
> sipAPIhello.h
> siphelloHello.cpp
> siphellocmodule.cpp
>
> And commenting the setDefault function build the project correctly.
Difficult to say without seeing your hello.h, hello.cpp and hello.sip.
Phil
More information about the PyQt
mailing list