Qt Designer

Installing the Qt Designer

In a terminal install the Qt Designer with:

sudo apt install qttools5-dev-tools

Note

The Qt6 Designer is not needed, the Qt5 Designer works fine.

Building a GUI

Run the Qt Designer from the Applications > Programming menu and create a new Main Window.

_images/designer-01.png

To add a Tool Bar right click on the main window and select Add Tool Bar

_images/designer-02.png

To add a Menu type in the menu area and press enter.

_images/designer-03.png

When you create a Menu item it creates and action, the action can be dragged to the Tool Bar to create a tool bar button.

_images/designer-04.png

Adding items from the Widget Box is drag and drop. To create a basic layout from Containers add two Frames and a Tab Widget.

_images/designer-05.png

Right click in the QMainWindow and select Lay out > Lay out Vertically.

_images/designer-06.png _images/designer-07.png

Add a Push Button to the QFrame then right click on the frame or the QFrame in the Object Inspector and set the lay out to grid.

_images/designer-08.png _images/designer-09.png

After dragging a widget into the window make sure you use the correct objectName for that widget. For example the E Stop button is called estop_pb.

Note

Each object name must be unique, designer will not allow duplicate names

Save the GUI in the configuration directory where you launch LinuxCNC.

You can start Qt5 Designer from a terminal with designer & which spawns a new process

Note

There is an issue with Qt5 Designer and bold fonts.

Qt6 Designer

Qt6 Designer can be installed from a terminal with

sudo apt install designer-qt6

To run Qt6 Designer you have to use the full path to the executable

/usr/lib/qt6/bin/designer