How to open QT ui file in LinuxCNC

More
1 year 8 months ago #322652 by cmorley
Unfortunately the tester simulation config is missing in 2.9, but you can try this one.
unzip it in your YOUR NAME/linuxcnc/configs folder.
Then add your Designer .ui file in there naming it tester.ui

Load linuxcnc and select tester.ini
It should then load your panel with linuxcnc.

If you are using master branch tester is in sim/qtvcp_screens/tester

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

More
1 year 8 months ago #322681 by hakinen2255
Thank u very much, it worked.

the files u shared should come with qtvcp install and your information should be in the qtvcp documentation, thanks again.

I can dive in to UI designing now, qtvcp is written in a way that u design the general layout in qt and finish the design by styling it with .qss file right?

I want to make the design like the attached UIs, graphics can be done in qt directly or .qss is a must?

if so, can u add animations to .qss which can be played one time during launch of the ui for example?
 

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

More
1 year 7 months ago #323096 by hakinen2255
Hi cmorley,

I am designing the QT interface from scratch but it will take some time to be able to use my machine in the meantime i wanted to load this vertical qtdragon_hd ui but it didnt work linuxcnc gives an error and close,

i have this folder ../linuxcnc/config/sim.qtdragon_hd.qtdragon_hd_xyz/qtvcp

i made a copy of qtdragon_hd with qtvcp copy command to this folder, so its like this now:

../linuxcnc/config/sim.qtdragon_hd.qtdragon_hd_xyz/qtvcp/screens/qtdragon_hd/

and there is the .ui file etc in there,

i copied the original one to somewhere else and put the vertical ui file there and changed the name to qtdragon_hd.ui

so when i select qtdragon_hd_xyz or _xyza during linuxcnc launch under my configurations it should load the vertical ui right? am i wrong?

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

More
1 year 7 months ago #323102 by cmorley
Yes. What is the error?
Are you using 2.9 or master branch?
I'll have the master branch version available tonight I think.

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

More
1 year 7 months ago #323113 by hakinen2255
while loading horizontal qtdragon_hd it says version 2.9.2 and attached is the error when i change the .ui file with vertical

Error report created by /usr/lib/tcltk/linuxcnc/show_errors.tcl:

Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc/modules
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.9.2
Machine configuration directory is '/home/hakan/linuxcnc/configs/sim.qtdragon_hd.qtdragon_hd_xyz'
Machine configuration file is 'qtdragon_hd_xyza.ini'
INIFILE=/home/hakan/linuxcnc/configs/sim.qtdragon_hd.qtdragon_hd_xyz/qtdragon_hd_xyza.ini
VERSION=1.1
PARAMETER_FILE=qtdragon.var
TPMOD=
HOMEMOD=
TASK=milltask
HALUI=halui
DISPLAY=qtvcp qtdragon_hd
COORDINATES=XYZA
KINEMATICS=trivkins coordinates=XYZA
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Found file(lib): /usr/share/linuxcnc/hallib/gantrysim.hal
Loaded HAL Components:
ID      Type  Name                                            PID   State
    26  RT    trivkins                                              ready
    25  User  halcmd8863                                       8863 ready
    21  RT    homemod                                               ready
    16  RT    tpmod                                                 ready
    10  User  halui                                            8852 ready
     4  User  iocontrol                                        8850 ready

Found file(lib): /usr/share/linuxcnc/hallib/simulated-gantry-home.hal
Starting TASK program: milltask
Starting DISPLAY program: qtvcp
Shutting down and cleaning up LinuxCNC...
task: 12368 cycles, min=0.000003, max=0.036588, avg=0.010045, 0 latency excursions (> 10x expected cycle time of 0.010000s)
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Debug file information:
Note: Using POSIX realtime
[QTvcp.QTVCP.QT_ISTAT][[33mWARNING[0m]  Missing [DISPLAY] ANGULAR_INCREMENTS- using defaults. (qt_istat.py:317)
[QTvcp.QTVCP.QT_MAKEGUI][[41mCRITICAL[0m]  'VCPWindow' object has no attribute 'btn_goto_sensor_clicked' (qt_makegui.py:212)
[QTvcp][[41mCRITICAL[0m]  Retry from Error Dialog
 Qtvcp encountered an error.  The following information may be useful in troubleshooting:
LinuxCNC Version  : 2.9.2

Traceback (most recent call last):
  File "/usr/bin/qtvcp", line 545, in <module>
    _qtvcp = QTVCP()
             ^^^^^^^
  File "/usr/bin/qtvcp", line 275, in __init__
    window.instance(filename=self.PATH.XML)
  File "/usr/lib/python3/dist-packages/qtvcp/qt_makegui.py", line 201, in instance
    instance = uic.loadUi(filename, self)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/PyQt5/uic/__init__.py", line 241, in loadUi
    return DynamicUILoader(package).loadUi(uifile, baseinstance, resource_suffix)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/PyQt5/uic/Loader/loader.py", line 66, in loadUi
    return self.parse(filename, resource_suffix)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/PyQt5/uic/uiparser.py", line 1037, in parse
    actor(elem)
  File "/usr/lib/python3/dist-packages/PyQt5/uic/uiparser.py", line 929, in createConnections
    slot = self.factory.getSlot(name2object(conn.findtext('receiver')),
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/PyQt5/uic/objcreator.py", line 131, in getSlot
    return self._cpolicy.getSlot(obj, slotname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/PyQt5/uic/Loader/qobjectcreator.py", line 147, in getSlot
    return getattr(object, slotname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'VCPWindow' object has no attribute 'btn_goto_sensor_clicked'

 (qtvcp:505)
8846
8877
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime



Info report created by linuxcnc_info:
The file:    /tmp/linuxcnc_info.txt
can be posted to a forum or a web site like:
     pastebin.com
in order to provide information about the linuxcnc
system and configuration.

                Date: Tue Mar 4 12:16:52 AM EST 2025
            UTC Date: Tue Mar 4 05:16:52 AM UTC 2025
        this program: /usr/bin/linuxcnc_info
              uptime: 00:16:52 up 7:21, 1 user, load average: 0.49, 0.57, 0.34
     lsb_release -sa: Debian Debian GNU/Linux 12 (bookworm) 12 bookworm
            linuxcnc: /usr/bin/linuxcnc
                 pwd: /home/hakan/linuxcnc/configs/sim.qtdragon_hd.qtdragon_hd_xyz
                USER: hakan
             LOGNAME: hakan
                HOME: /home/hakan
              EDITOR:
              VISUAL:
            LANGUAGE:
                TERM: dumb
           COLORTERM:
             DISPLAY: :0.0
             DESKTOP: xfce
        display size: 3840x3020 pixels (1016x799 millimeters)
                PATH: /usr/bin:/home/hakan/linuxcnc/configs/sim.qtdragon_hd.qtdragon_hd_xyz/bin:/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

uname items:
         nodename -n: CSF750
      kernel-name -s: Linux
      kernel-vers -v: #1 SMP PREEMPT_RT Debian 6.1.67-1 (2023-12-12)
          machine -m: x86_64
        processor -p: unknown
         platform -i: unknown
      oper system -o: GNU/Linux

/proc items:
             cmdline: BOOT_IMAGE=/boot/vmlinuz-6.1.0-16-rt-amd64 root=UUID=4d925627-cc3b-45aa-ae68-050d85babc80 ro quiet loglevel=3 fbcon=rotate:1 fbcon=rotate:1 quiet isolcpus=1,2,3 splash loglevel=3 mitigations=off
          model name: Intel(R) Core(TM) i3-8145U CPU @ 2.10GHz
               cores: 2
             cpu MHz: 3347.627
             parport:
              serial: 0000-0000 : serial

Versions:
                 gcc: gcc (Debian 12.2.0-14) 12.2.0
              python: Python 3.11.2
                 git: git version 2.39.5
          git commit: NA
                 tcl: 8.6
                  tk: 8.6
               glade: not_in_PATH

linuxcnc_var all:

     LINUXCNCVERSION: 2.9.2
LINUXCNC_AUX_GLADEVCP: /usr/share/linuxcnc/aux_gladevcp
LINUXCNC_AUX_EXAMPLES: /usr/share/linuxcnc/aux_examples
            REALTIME: /usr/lib/linuxcnc/realtime
                 RTS: uspace
          HALLIB_DIR: /usr/share/linuxcnc/hallib
              PYTHON: /usr/bin/python3

dpkg -l '*linuxcnc*':
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                Version      Architecture Description
+++-===================-============-============-=====================================================================
un  linuxcnc            <none>       <none>       (no description available)
un  linuxcnc-dev        <none>       <none>       (no description available)
un  linuxcnc-doc        <none>       <none>       (no description available)
ii  linuxcnc-doc-de     1:2.9.2      all          motion controller for CNC machines and robots (German documentation)
ii  linuxcnc-doc-en     1:2.9.2      all          motion controller for CNC machines and robots (English documentation)
ii  linuxcnc-doc-es     1:2.9.2      all          motion controller for CNC machines and robots (Spanish documentation)
ii  linuxcnc-doc-fr     1:2.9.2      all          motion controller for CNC machines and robots (French documentation)
un  linuxcnc-sim        <none>       <none>       (no description available)
un  linuxcnc-sim-dev    <none>       <none>       (no description available)
ii  linuxcnc-uspace     1:2.9.2      amd64        motion controller for CNC machines and robots
ii  linuxcnc-uspace-dev 1:2.9.2      amd64        PC based motion controller for real-time Linux

 

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

More
1 year 7 months ago #323125 by cmorley
Try this version for 2.9.
name it qtdragon_hd.ui
put it in YOUR CONFIG FOLDER/qtvcp/screens/qtdragon_hd/

Chris

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

Moderators: cmorley
Time to create page: 0.213 seconds
Powered by Kunena Forum