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 ?
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);
您无法控制visible
属性,但是如果要使QLabel
默认为不可见,只需将width/height
属性设置为0
。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.