Screen shots of gui designs
-Kurt
Please Log in or Create an account to join the conversation.
$ 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.
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.
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.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Sorry for the trouble.
Chris M
Please Log in or Create an account to join the conversation.
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
Please Log in or Create an account to join the conversation.
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
Please Log in or Create an account to join the conversation.
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
Please Log in or Create an account to join the conversation.