Screen shots of gui designs

More
30 Dec 2017 18:27 #103866 by KCJ
Replied by KCJ on topic Screen shots of gui designs
Chris, great work! I can't wait to get back from vacation so I can check it out and see about making a full UI.

-Kurt

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

More
12 Jan 2018 18:04 #104352 by persei8
Replied by persei8 on topic Screen shots of gui designs
Sorry to be a PITA. I managed to download (clone) qtvcp_py2 and build and install it, but now when I run it like so:

$ linuxcnc qtdefault.ini
LINUXCNC - 2.8.0~pre1
Machine configuration directory is '/home/jim/linuxcnc/configs/sim.qtscreen'
Machine configuration file is 'qtdefault.ini'
Starting LinuxCNC...
emc/iotask/ioControl.cc 768: can't load tool table.
Found file(lib): /usr/share/linuxcnc/hallib/core_sim.hal
Note: Using POSIX realtime
Found file(lib): /usr/share/linuxcnc/hallib/sim_spindle_encoder.hal
Found file(lib): /usr/share/linuxcnc/hallib/simulated_home.hal
Found file(REL): ./check_constraints.hal
Traceback (most recent call last):
File "/usr/bin/qtscreen", line 8, in <module>
from qtvcp.core import Status
ImportError: No module named qtvcp.core
Shutting down and cleaning up LinuxCNC...

At github.com/LinuxCNC/linuxcnc/tree/770a0f...339/lib/python/qtvcp there is no clone or download button, so how do I get the qtvcp module and where does it go when I get it?

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

More
12 Jan 2018 21:41 #104360 by persei8
Replied by persei8 on topic Screen shots of gui designs
OK I got that resolved, but now it's:

Traceback (most recent call last):
File "/usr/bin/qtscreen", line 23, in <module>
from qtvcp import qt_makepins, qt_makegui
File "/usr/lib/python2.7/dist-packages/qtvcp/qt_makepins.py", line 24, in <module>
from qtvcp.qt_glib import QComponent
ImportError: No module named qt_glib
Shutting down and cleaning up LinuxCNC...

I resolved the first issue by creating a symlink to the linuxcnc-qt5vcp_py2 directory, but this time, there really is no module named qt_glib.

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

More
12 Jan 2018 22:22 - 12 Jan 2018 22:35 #104367 by KCJ
Replied by KCJ on topic Screen shots of gui designs
You probably should be building LCNC from source to use the development branches. It sounds like you might not be doing that. I can walk you thru that if needed. I am going to checkout the qt5vcp_py2 branch in a bit here myself.

EDIT:

At github.com/LinuxCNC/linuxcnc/tree/770a0f...339/lib/python/qtvcp there is no clone or download button, so how do I get the qtvcp module and where does it go when I get it?


You need to have git installed and configured. Then
git clone https://github.com/LinuxCNC/linuxcnc.git linuxcnc-dev
cd linuxcnc-dev
git checkout qt5vcp_py2

That will give you a directory with the qt5vcp_py2 branch, than build that as a RIP. Follow the directions here: www.wiki.eusurplus.com/index.php?title=LinuxCNC_Run_In_Place

Don't hesitate to ask if you still are having trouble.
Last edit: 12 Jan 2018 22:35 by KCJ. Reason: Forum ate the https
The following user(s) said Thank You: persei8

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

More
12 Jan 2018 22:40 #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
12 Jan 2018 22:44 #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
13 Jan 2018 00:00 #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
06 Jun 2018 10:15 - 06 Jun 2018 10:17 #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: 06 Jun 2018 10:17 by Ilya.

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

More
06 Jun 2018 14:21 - 06 Jun 2018 14:23 #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
Attachments:
Last edit: 06 Jun 2018 14:23 by cmorley.
The following user(s) said Thank You: Ilya

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

More
06 Jun 2018 16:12 - 06 Jun 2018 16:15 #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
#!/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
$ . 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
Attachments:
Last edit: 06 Jun 2018 16:15 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.246 seconds
Powered by Kunena Forum