How to open QT ui file in LinuxCNC

More
25 Feb 2025 12:19 #322581 by hakinen2255
How to open QT ui file in LinuxCNC was created by hakinen2255
Hi all,

I am a windows user and very new in Linux environment, because of the limitations i am switching from Mach4 to Linuxcnc.

- Os: Debian 12 bookworm and linuxcnc came together with it
- manage to install QT 5.15.8 designer
- also linuxcnc widgets installed in QT designer

I prefer to use vertical screen so at first i wanted to try to design a new ui from scratch, i will also try to modify an existing 4 axis horizontal ui to vertical by just moving the widgets around(not deleting or adding anything) but first;

i am following this guide linuxcnc.org/docs/stable/html/gui/qtvcp...._sheet_custom_screen

put some buttons, gcode view, graphics view etc. but stuck with the line where it says "save the .ui file", it says to save it as tester.ui in sims/qtvcp folder. it doesnt say where that folder is or how to load the ui in linuxcnc.

this is most probably a very simple question but can any of u guys tell me where that folder is and how to open tester.ui gui in linuxcnc and test it as sim ui?

I am getting used to all linux environment and that "sudo" thing so please say it as simple as possible like u are teaching to a windows user

Thanks in advance..

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

More
25 Feb 2025 13:48 #322588 by TangentAudio
Replied by TangentAudio on topic How to open QT ui file in LinuxCNC
The overview section of the documentation is a good place to start.  linuxcnc.org/docs/html/gui/qtvcp.html#sec:qtvcp-overview

The way your custom .ui file is loaded when starting LinuxCNC is via this line in your .ini file:DISPLAY = qtvcp <options> <screen_name>Where <screen_name> is the base name of your ui file - in your case you saved "tester.ui" so the basename is just plain "tester".   Generally you want this ui file to be saved in the same folder as the rest of your LinuxCNC config.

You might find it valuable to install one of the QtVcp "sim" demos, which will create a working set of configuration files for a simulated machine with a QtVcp GUI.  It's much easier to experiment and see how the pieces fit together when you're starting from something that works.  You can run or set these up via the screens that you get when you first run LinuxCNC from the applications menu.

I know this isn't the step-by-step guide you were looking for, but hopefully it's some help to get you going.

 

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

More
25 Feb 2025 15:21 #322599 by hakinen2255
Replied by hakinen2255 on topic How to open QT ui file in LinuxCNC
First of all thank u for your reply,

i loaded and checked some demos which came with linuxcnc, the thing i want to achieve is as same as qtplasmac_p_metric which is a 9:16 vertical design, its too bad that it is for a plasma, i need a cnc 4 axis mill version of it.

i know in general that .ini file declares the name of the .ui file and i dont know why but u guys make the general layout in qt and then style it with .qss file, qt is there for ui design is it not possible to create all ui with images or qt elements directly in qt? i mean is there some kind of limitation in qt for linuxcnc that u guys prefer to use coding for ui styling?

anyhow this is what i was looking for;

- create an .ini file which includes the following base code in it(a sample base code can be given) or copy one of the .ini files from demo screens,
- rename the screen name
- put it in a folder named tester under..... location together with the .ui file
- and copy tester.py from .... location .... to the same folder
- run linuxcnc and tester will appear under sample configurations/sim(i dont know if u put all in a single folder it will appear in there or not)

because if u dont say where to put and how to create all the necessary files in the document then its not a document its just general information thing.

I still dont know how to create(what to put in) .ini and where to put .ini and .ui file for linuxcnc to see them so that i can choose that ui.

Which folder is it?

and should i run any command for linuxcnc to load it at the first time?

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

More
25 Feb 2025 16:05 #322607 by hakinen2255
Replied by hakinen2255 on topic How to open QT ui file in LinuxCNC
ok,

lets write it in here so any newbie can see, correct me if i am wrong;

- there is a folder /usr/share/qtvcp/screens/tester that folder has the sample .ui and .py file
- and there is a folder /home/<username>/linuxcnc/configs, u have to create a folder named tester in there and put tester.ini, tester.ui and tester_handler.py files in it

if u dont put tester.ini file in that folder, u can not see tester under My Configurations during linuxcnc launch.

when u put a tester.ini file "tester" can be seen during linuxcnc launch so that u can select it and load.

but i dont have a correct .ini file so linuxcnc gives errors during launch and exits.

question:

by using linuxcnc Pncconf wizard(i am gonna use mesa card) can i create the .ini file?

so in its display section if i enter "tester" does it load the tester.ui i created in qt designer?

most probably yes am i correct?

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

More
25 Feb 2025 20:44 #322627 by cmorley
Replied by cmorley on topic How to open QT ui file in LinuxCNC

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

More
25 Feb 2025 22:41 #322637 by hakinen2255
Replied by hakinen2255 on topic How to open QT ui file in LinuxCNC
thanks, yes i saw it, i will give it a try as soon as i learn this UI principles of linuxcnc..

as in everything the hard part is the beginning part i suppose..

this happens mostly because of i am new in linux environment and there is no step by step instructions for anything in linux.

i will write everything i learn step by step under this topic about the UI designing and editing for linuxcnc with qt designer so that newbies may save some time

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

More
26 Feb 2025 05:44 #322652 by cmorley
Replied by cmorley on topic How to open QT ui file in LinuxCNC
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
Attachments:

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

More
26 Feb 2025 11:20 #322681 by hakinen2255
Replied by hakinen2255 on topic How to open QT ui file in LinuxCNC
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?
 
Attachments:

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

More
03 Mar 2025 18:12 #323096 by hakinen2255
Replied by hakinen2255 on topic How to open QT ui file in LinuxCNC
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
03 Mar 2025 19:14 #323102 by cmorley
Replied by cmorley on topic How to open QT ui file in LinuxCNC
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.

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