Last night I managed to get the widgets to load into QtDesigner on Debian Stretch running Qt 5.7.1 :woohoo:
Chris has done a fantastic job on QtVCP!!!
I encountered a few problems, but this is what I ended up doing:
First, obtain the correct version of the libpyqt5.so for your system, Qt version and Python2.7. I ended up compiling PyQt5 for Python2 per my notes linked by Chris M. If you can find a pre-compiled version then you should be able to just put that in /usr/lib/x86_64-linux-gnu/qt5/plugins/designer/
I have attached a libpyqt5_py2.so for a 64bit OS with Python2.7 and Qt 5.7.1. Hopefully between that and the one for Qt5.5 Chris attached to his post you will have something that will work.
Second, Chris suggests adding a python folder under /usr/lib/x86_64-linux-gnu/qt5/plugins/designer/ and creating a link to qtvcp_plugin.py. That will certainly work and is probably best, but I found it simpler to set the PYQTDESIGNERPATH environment variable to point to the plugins.
Here is a little script I use to set up the environment and launch the designer.
launch_designer.sh
Code:
#!/bin/sh
# Change path to point to your LinuxCNC RIP
LCNC_DIR=$HOME/dev/cnc/linuxcnc-qt5vcp
. $LCNC_DIR/scripts/rip-environment
export PYQTDESIGNERPATH=$LCNC_DIR/lib/python/qtvcp/plugins
export QT_SELECT=qt5
designer $LCNC_DIR/share/qtscreen/skins/qt_cnc/qt_cnc.ui
To launch the designer simply open a terminal and source this script
Code:
$ . launch_designer.sh
Depending on your system the designer might hang when trying to load the plugins. I tracked the problem down to graphicsplugin.py. If you have this problem you can comment out the entire GraphicsPlugin class in that file and the designer should then load.
Note: You may notice that I have appended '_py2' to the end of the attached libpyqt5.so file. This is because I use designer plugins written in both Py2 and Py3 so I needed some way do distinguish the two versions of libpyqt5.so. Appending '_py2' and '_py3' to the libpyqt5.so files lets them coexist in the /usr/lib/x86_64-linux-gnu/qt5/plugins/designer/ and designer seems smart enough to be able to chose the right one to use. Isn't it nice when things you try on a whim actually work!
Cheers,
Kurt