2

I need a way to set the visibility of a QGroupBox widget on QT to "false" by default.

However, if I hardcoded it, the auto-generated header file of the ".ui" (that is "ui_(x).h") will be deleted whenever I do a project "Clean All", which means 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 (i.e.:"ui_(x).h") 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 return to "true" again (since "false" is not the default visibility value) ..

How can I set a default visibility value on QT from QT-Designer (or even enforce the auto-generate engine to set specific value)?

McLan
  • 2,552
  • 9
  • 51
  • 85
  • Note, doing this from code right after doing the "setupui" should be easy way to achieve this outside Designer. – hyde Mar 14 '14 at 21:27

1 Answers1

1

UI_(x).h is generated from x.ui form file. If you set the groubbox to be hidden in x.ui file, I think this is what you want. Please refer to this link

Initially hidden control in Qt Creator

Community
  • 1
  • 1
m. c.
  • 867
  • 5
  • 12