I've been working on project in Visual Studio and QtDesigner.
I want to set QLabel(pixel, mm)
be invisible by default.
Someone have any idea ?
Asked
Active
Viewed 6,838 times
3
-
2Not possible AFAIK. Just set it to invisible in the constructor. – SteakOverflow Feb 22 '18 at 13:33
-
yes. That's it. Done. Tks a lot – manuntn08 Feb 22 '18 at 13:37
-
Possible duplicate of [Initially hidden control in Qt Creator](https://stackoverflow.com/questions/7821481/initially-hidden-control-in-qt-creator) – Mohammad Kanan Feb 23 '18 at 01:33
2 Answers
5
It is not possible to set QWidget visible-property in QtDesigner, see this question : Initially hidden control in Qt Creator.
You need to do this through the code, in your parent constructor after initializing the UI objects:
ui->setupUi(this);
[...]
ui->myLabel->setVisible(false);
0
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
.

JustWe
- 4,250
- 3
- 39
- 90