13

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);
Robert Whitley
  • 1,051
  • 5
  • 14
  • 28

1 Answers1

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.

Exa
  • 4,020
  • 7
  • 43
  • 60
  • 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).. – McLan Mar 14 '14 at 15:45