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

1

14

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);
Teague answered 13/2, 2012 at 12:2 Comment(0)
A
18

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.

Audiogenic answered 13/2, 2012 at 12:23 Comment(1)
me too: I need a way to set the visibility of a QGroupBox to "false" by default. However, if I hardcoded it, the auto-generated header file will be deleted whenever I do "Clean All", so I have to re-hardcode it again . this is a tedious job specially in my case where I have to deal with SVN (the UI header file will not be committed when I do svn-commit (since it is auto-generated), then when I do a svn-update on another machine the visibility will be "true" again (since "false" is not the default visibility value)) .. any new answer ? (since it has been a year now for your answer)..Finally

© 2022 - 2024 — McMap. All rights reserved.