Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to set the visibility of QLabel in Qt Designer

I'm trying to make a QLabel not visible by default in Qt Designer. I can hard code it but I was wondering if there was a way to set this using the designer.

m_uiForm.aLabel->setVisible(false);
like image 605
Robert Whitley Avatar asked Feb 13 '12 12:02

Robert Whitley


People also ask

How do you hide QLabel?

You can't control the visible property, But if you want to make QLabel looks invisible as default, just set the width/height property to 0 .

How do you use QLabel?

For this use QLabel provides a useful mechanism for adding an mnemonic (see QKeySequence) that will set the keyboard focus to the other widget (called the QLabel's "buddy"). For example: QLineEdit *phoneEdit = new QLineEdit(this); QLabel *phoneLabel = new QLabel("&Phone:", this); phoneLabel->setBuddy(phoneEdit);

How do you zoom in on Qt?

Zoom (Ctrl+wheel;+;-) in QtDesigner in QtCreator.

What is QLabel?

QLabel is used for displaying text or an image. No user interaction functionality is provided. The visual appearance of the label can be configured in various ways, and it can be used for specifying a focus mnemonic key for another widget.


1 Answers

As far as I know, this is not possible from QtDesigner.

The only way to access setVisible directly from QtDesigner is when modifying connects you can find it as a slot.

The simplest way is just to set the visibility to false just like you are doing already.

like image 197
Exa Avatar answered Sep 20 '22 00:09

Exa