No linuxcnc widgets in designer
30 Aug 2020 14:37 #180079
by lllars
Replied by lllars on topic No linuxcnc widgets in designer
Yes, assuming you mean libpyqt5_py2.so. I am using the version from the 5.9 directory, and qt designer is version 5.9.5.
Just as a test, I tried using the 5.7 version of libpyqt5_py2.so. No difference. No errors, it still showed up in about plugins.
The qtvcp install instructions mention the possibility of compiling it myself, and I'm open to trying that if it seems like it would help. It's not clear to me exactly what I'd be trying to compile though or where I get the source files from.
From the instructions:
Then you need the python-module loading library added.
Qtvcp uses QT5 with python2 - this combination is not normally available from
repositories. You can compile it your self or there are precompiled versions
available for common systems.
in lib/python/qtvcp/designer there are folders...
Just as a test, I tried using the 5.7 version of libpyqt5_py2.so. No difference. No errors, it still showed up in about plugins.
The qtvcp install instructions mention the possibility of compiling it myself, and I'm open to trying that if it seems like it would help. It's not clear to me exactly what I'd be trying to compile though or where I get the source files from.
From the instructions:
Then you need the python-module loading library added.
Qtvcp uses QT5 with python2 - this combination is not normally available from
repositories. You can compile it your self or there are precompiled versions
available for common systems.
in lib/python/qtvcp/designer there are folders...
Please Log in or Create an account to join the conversation.
30 Aug 2020 16:19 #180089
by cmorley
Replied by cmorley on topic No linuxcnc widgets in designer
here is one more thing to try:
export PYQTDESIGNERPATH='/path/to/plugin/directory/'
Otherwise here are two instructions for compiling.
Obviously you must adjust for the qt5.9 version.
gist.github.com/KurtJacobson/34a2e45ea2227ba58702fc1cb0372c40
www.ics.com/blog/integrating-python-base...m-widget-qt-designer
export PYQTDESIGNERPATH='/path/to/plugin/directory/'
Otherwise here are two instructions for compiling.
Obviously you must adjust for the qt5.9 version.
gist.github.com/KurtJacobson/34a2e45ea2227ba58702fc1cb0372c40
www.ics.com/blog/integrating-python-base...m-widget-qt-designer
Please Log in or Create an account to join the conversation.
30 Aug 2020 17:32 #180095
by lllars
Replied by lllars on topic No linuxcnc widgets in designer
Success!!
I had to compile PyQt5 from source. Setting PYQTDESIGNERPATH before compiling had no effect.
I followed the instructions from your first link, but swapped in newer versions of SIP and PyQt5, since my Qt version is 5.9.5 (not 5.7.x) Here's the full list of commands I ran:
After all that, it still didn't work, but I think that was because I still had PYQTDESIGNERPATH set, and it must have been set to the wrong directory (I had previously been trying all the paths I could think to try). Setting:got it working.
Note that when things weren't working, it was confusing to me exactly which path PYQTDESIGNERPATH should be set to. My best guesses were '/usr/lib/x86_64-linux-gnu/qt5/plugins/' and '/usr/lib/x86_64-linux-gnu/qt5/plugins/designer/'. I can now see that setting either of those paths will prevent the linuxcnc widgets from loading. If it is set at all, it really needs to point to the python directory.
Note also that I had tried setting PYQTDESIGNERPATH to the correct python directory before compiling PyQt5 and it did not help, so compiling from source really was necessary.
Finally I unset PYQTDESIGNERPATH, and it still works, so setting it does not appear to be necessary in my case.
Thanks so much for your help Chris! Now I'll be on to trying to modify QtDragon to fit my 1280x1024 screen.
I had to compile PyQt5 from source. Setting PYQTDESIGNERPATH before compiling had no effect.
I followed the instructions from your first link, but swapped in newer versions of SIP and PyQt5, since my Qt version is 5.9.5 (not 5.7.x) Here's the full list of commands I ran:
$ sudo apt-get install g++
$ sudo apt-get install libpython-dev
$ wget https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.13/sip-4.19.13.tar.gz
$ tar xzvf sip-4.19.13.tar.gz
$ cd sip-4.19.13
$ python configure.py
$ make -j4
$ sudo make install
$ cd ../
$ wget https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.9.2/PyQt5_gpl-5.9.2.tar.gz
$ tar xzvf PyQt5_gpl-5.9.2.tar.gz
$ cd PyQt5_gpl-5.9.2/
$ python configure.py
$ make -j4
$ sudo make install
After all that, it still didn't work, but I think that was because I still had PYQTDESIGNERPATH set, and it must have been set to the wrong directory (I had previously been trying all the paths I could think to try). Setting:
$ export PYQTDESIGNERPATH='/usr/lib/x86_64-linux-gnu/qt5/plugins/designer/python'
Note that when things weren't working, it was confusing to me exactly which path PYQTDESIGNERPATH should be set to. My best guesses were '/usr/lib/x86_64-linux-gnu/qt5/plugins/' and '/usr/lib/x86_64-linux-gnu/qt5/plugins/designer/'. I can now see that setting either of those paths will prevent the linuxcnc widgets from loading. If it is set at all, it really needs to point to the python directory.
Note also that I had tried setting PYQTDESIGNERPATH to the correct python directory before compiling PyQt5 and it did not help, so compiling from source really was necessary.
Finally I unset PYQTDESIGNERPATH, and it still works, so setting it does not appear to be necessary in my case.
Thanks so much for your help Chris! Now I'll be on to trying to modify QtDragon to fit my 1280x1024 screen.
Please Log in or Create an account to join the conversation.
30 Aug 2020 20:10 #180104
by persei8
Replied by persei8 on topic No linuxcnc widgets in designer
You could also turn on debugging and look at the output stream for errors.
export QT_DEBUG_PLUGINS=1
BTW, there's an HD version of qtdragon at github.com/persei802/QtDragon_hd that might give you a starting point.
export QT_DEBUG_PLUGINS=1
BTW, there's an HD version of qtdragon at github.com/persei802/QtDragon_hd that might give you a starting point.
The following user(s) said Thank You: lllars
Please Log in or Create an account to join the conversation.
30 Aug 2020 21:29 #180108
by cmorley
Replied by cmorley on topic No linuxcnc widgets in designer
Glad you got it working. must be because different paths are compiled in.
Could you post your compiled library binary?
Could you post your compiled library binary?
Please Log in or Create an account to join the conversation.
31 Aug 2020 02:09 #180128
by phillc54
Replied by phillc54 on topic No linuxcnc widgets in designer
You may need to get a later version on the 2.8 release, the Buster ISO I installed shows python-pyqt5 5.11
Please Log in or Create an account to join the conversation.
31 Aug 2020 02:45 #180129
by cmorley
Replied by cmorley on topic No linuxcnc widgets in designer
oh yes you are surely right - though I might not get it done before Andy releases it..
Please Log in or Create an account to join the conversation.
05 Sep 2020 02:44 #180772
by lllars
Here you go: Sorry for the delay; I didn't notice this request until just now.
Replied by lllars on topic No linuxcnc widgets in designer
Glad you got it working. must be because different paths are compiled in.
Could you post your compiled library binary?
Here you go: Sorry for the delay; I didn't notice this request until just now.
Please Log in or Create an account to join the conversation.
24 Sep 2020 07:33 - 25 Sep 2020 01:20 #183553
by phillc54
Replied by phillc54 on topic No linuxcnc widgets in designer
I am having the same issue with the Qtvcp widgets not appearing. I have followed the instructions from
here
and am getting the following error on both Strech and Buster (both these are installed from LinuxCNC ISO's)
Stretch has qt5 v5.7 and Buster has qt5 v5.11
If I remove the link from /home/phill/.designer/plugins/python/ designer does run but without the Qtvcp widgets.
Edit: I am running master from the Buildbot on both machines. I reverted the Stretch machine to 2.8 but it still has the same issue.
Edit2: Further searching shows that I failed to search correctly in the first place, renaming the file as suggested here has fixed it on both machines.
Perhaps a mention of this in the above doc would be appropriate.
Stretch has qt5 v5.7 and Buster has qt5 v5.11
phill@stretch ~ $ designer -qt=5
Traceback (most recent call last):
File "/home/phill/.designer/plugins/python/qtvcp_plugin.py", line 22, in <module>
from qtvcp.plugins.simplewidgets_plugin import *
ImportError: No module named 'qtvcp'
Segmentation fault
phill@stretch ~ $
If I remove the link from /home/phill/.designer/plugins/python/ designer does run but without the Qtvcp widgets.
Edit: I am running master from the Buildbot on both machines. I reverted the Stretch machine to 2.8 but it still has the same issue.
Edit2: Further searching shows that I failed to search correctly in the first place, renaming the file as suggested here has fixed it on both machines.
Perhaps a mention of this in the above doc would be appropriate.
Last edit: 25 Sep 2020 01:20 by phillc54.
Please Log in or Create an account to join the conversation.
25 Sep 2020 16:31 #183746
by cmorley
Replied by cmorley on topic No linuxcnc widgets in designer
Ok Phill I'll do that.
I'll be glad when we get to python3 only and avoid these problems.
I'll be glad when we get to python3 only and avoid these problems.
Please Log in or Create an account to join the conversation.
Moderators: cmorley
Time to create page: 0.101 seconds