I want to know how to create a QLabel in QtCreator Design mode that is hidden by default?
In the properties list in the right hand side panel , there's not any option regarding visibility
and also adding label->hide()
to setupUi
function (after compiling ui file and adding to the project headers) makes no difference.
Designer doesn't expose the visible
property. You could hand-edit the UI file, but that will be overwritten next time you edit in Designer. It's best to leave it visible in Designer, and just write a line of code after you call setupUi()
to hide the widget you don't want to be initially shown.