No linuxcnc widgets in designer

More
30 Aug 2020 14:37 #180079 by lllars
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...

Please Log in or Create an account to join the conversation.

More
30 Aug 2020 16:19 #180089 by cmorley
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

Please Log in or Create an account to join the conversation.

More
30 Aug 2020 17:32 #180095 by lllars
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:
$ 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'
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.

Please Log in or Create an account to join the conversation.

More
30 Aug 2020 20:10 #180104 by persei8
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.
The following user(s) said Thank You: lllars

Please Log in or Create an account to join the conversation.

More
30 Aug 2020 21:29 #180108 by cmorley
Glad you got it working. must be because different paths are compiled in.
Could you post your compiled library binary?

Please Log in or Create an account to join the conversation.

More
31 Aug 2020 02:09 #180128 by phillc54
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.

More
31 Aug 2020 02:45 #180129 by cmorley
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.

More
05 Sep 2020 02:44 #180772 by lllars

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.
Attachments:

Please Log in or Create an account to join the conversation.

More
24 Sep 2020 07:33 - 25 Sep 2020 01:20 #183553 by phillc54
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
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.

More
25 Sep 2020 16:31 #183746 by cmorley
Ok Phill I'll do that.
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.105 seconds
Powered by Kunena Forum