fbpx

CS-Lab Support Forum for CNC Community

Help to run this brand-new forum and stay with us.
Ask your questions, we are here to help! 

 

Please or Register to create posts and topics.

GUI editor - Button to switch TabWidget active tab

Hello,

 

basically I want to have a button in the screen, which activates other widgets, e.g. changes to a defined tab. Background - depending on the screen size, you have to have really tiny fingers to hit the tabs correctly.

 

Regards

Daniel

 

You can write something in the style.css file to change the tab size or directly in the CSS in the GUI editor.

for example:
QTabBar::tab { height: 100px; width: 100px; }

 

Thank you - it would solve the size issue.

but I would love to use buttons for custom UI interaction as I can place them freely within the UI.

 

regards Daniel 

Quote from mydani on 13 January 2024, 22:22

Thank you - it would solve the size issue.

but I would love to use buttons for custom UI interaction as I can place them freely within the UI.

 

regards Daniel 

I don't understand exactly what you're trying to do...

I want to use UI buttons to change the appearance of the screen.

E.g. place 3 buttons on either side of the screen, and a button press changes the display in the center, one button for the probing, one button for the camera, one button for the tool management, etc.

Maybe you can get a useful result with the tab box. You can also use the style.css file to program the tabs to be arranged sideways, either with horizontal text or vertically.

Quote from mydani on 15 January 2024, 09:26

I want to use UI buttons to change the appearance of the screen.

E.g. place 3 buttons on either side of the screen, and a button press changes the display in the center, one button for the probing, one button for the camera, one button for the tool management, etc.

Take a look at the following command:

gui.tabCentral.setAttribute("currentIndex", 0)

This command switches tabs in the video connector.

video

carbonkid and mydani have reacted to this post.
carbonkidmydani

Perfect help, thanks!

PARTNERS:

 

USA

Germany

Slovenia / Bosnia

Spain

South Africa

UNI-CAM

The Netherlands

Portugal

Greece

  Distrib milionis logo

Hungary

Distrib logot

Bulgaria

Master

Kenya

Proteq Automation

Egypt

Germanelectronix

China

Jun Ma

Serbia

ALCO

Italy

LVL tech r

Denmark

Varntoft Dania

Finland

×

Hello!

Click one of our contacts below to chat on WhatsApp

× How can I help you?