Screen shots of gui designs

More
8 years 9 months ago #104370 by persei8
Replied by persei8 on topic Screen shots of gui designs
I did build it all from source and it now starts after I installed python-pyqt5.qsci. It is obviously only in development so for now I'm going back to gmoccapy so I can run the real machine. I need it so I can build a better one. It's been a really good learning experience to dig into how these UIs work and reading the posts of the real gurus, such as yourself and Andy and Norbert etc. I will be watching the development of both qtscreen and hazzy (and gmoccapy too). Regards.

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

More
8 years 9 months ago #104371 by persei8
Replied by persei8 on topic Screen shots of gui designs
That may have been my problem. I did not install as RIP but built a deb package and installed that with dpkg. Either way should work.

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

More
8 years 9 months ago #104374 by cmorley
Replied by cmorley on topic Screen shots of gui designs
Yes building a RIP is the way - i have not added the code to do debs
Sorry for the trouble.

Chris M

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

More
8 years 4 months ago - 8 years 4 months ago #111735 by Ilya
Replied by Ilya on topic Screen shots of gui designs
Hello
Thank you for your work
I have successfully built a linuxcnc-dev branch using qt5vcp_py2
Now I can use your screen, but I can't create my own.
I'm running qt designer, but there are no widgets for linuxcnc. Such as on your video.
How do I connect these widgets to my qt designer?

Regards,
ilya
Last edit: 8 years 4 months ago by Ilya.

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

More
8 years 4 months ago - 8 years 4 months ago #111756 by cmorley
Replied by cmorley on topic Screen shots of gui designs
you must build the libraries it seems.
Here is the general way to do it:
gist.github.com/KurtJacobson/34a2e45ea2227ba58702fc1cb0372c40

or maybe I could supply the library pre-compiled.
It depends on the QT version and whether using 32bit or 64 bit.
for qt 5.5 and 64 bit (I use mint distribution):

the supplied libpyqt5.so must be extracted then copied to:
/usr/lib/x86_64-linux-gnu/qt5/plugins/designer

then you add a folder there named python
then add add a link to qtvcp_plugin.py
whick should be in YOUR_HOME_FOLDER/linuxcnc/lib/python/qtvcp/plugins

launch designer from a terminal that you set the environment for linuxcnc (. scripts/rip-environment) with the command:
designer -qt=5

If all goes well then the widgets should be there.

If you are using qt5.5 but a 32 bit system I cold get that pre compiled library for you too.


Chris M
Last edit: 8 years 4 months ago by cmorley.
The following user(s) said Thank You: Ilya

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

More
8 years 4 months ago - 8 years 4 months ago #111766 by KCJ
Replied by KCJ on topic Screen shots of gui designs
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
Last edit: 8 years 4 months ago by KCJ. Reason: Fix Typos
The following user(s) said Thank You: Ilya

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

Time to create page: 0.438 seconds
Powered by Kunena Forum