[PyQt] Problem using PyQt5 designer python custom plugin

Phil Thompson phil at riverbankcomputing.com
Wed Jul 4 22:22:52 BST 2018


On 4 Jul 2018, at 6:22 pm, Ronald Petit <elronaldpetit at gmail.com> wrote:
> 
> Hello,
> 
> I just downloaded the latest SIP (4.19.11), and the latest PyQt5 (5.11.2), I compiled SIP using --sip-module PyQt5.sip and my configure command fro PyQt5 was
> 
> sudo python3 configure.py --qmake=/home/xxx/Qt/5.11.0/gcc_64/bin/qmake --designer-plugindir=/home/xxx/Qt/5.11.0/gcc_64/plugins/designer/
> 
> Everything went OK with with the compiling and installation. (I'm Using Python 3.7.0 in Ubuntu 16.04 LTS)
> 
> But, when I copy the pydemo.py and pydemoplugin.py from the sources examples to my designer plugin subfolderfolder "python" (as you can see, my Qt installation is on my profile root), I received the following error:
> 
> ModuleNotFoundError: No module named 'sip'
> 
> But is suppose that now sip is over PyQt5.sip don't know why the libpyqt5.so is importing directly "sip".
> 
> To fix this, I though that installing SIP again but with the default module will solve the problem, indeed, it install the sip.so library as older versions, however, after that I receive the following error when running the designer:
> 
> TypeError: unwrapinstance() argument 1 must be sip.simplewrapper, not PyDemoPlugin
> 
> Any clue why that happen and how I can fix it?
> 
> My custom widgets use to work using Python 3.5.2 and PyQt5 5.5.1, but I got a new computer and decided to use the latest versions.

Should be fixed in tonight's PyQt snapshot.

Thanks,
Phil


More information about the PyQt mailing list