[Qt] Hide settings label by default

This commit is contained in:
Satori 2020-10-09 18:11:47 +01:00
parent 6e59a5c5ef
commit 2a7f03028d
2 changed files with 4 additions and 0 deletions

View File

@ -27,6 +27,7 @@ SettingsCheckBox* SettingsGroupBox::CreateCheckBox(const QString& text,
auto font = widget_label->font();
font.setPointSizeF(kSubLabelSize);
widget_label->setFont(font);
widget_label->setVisible(false);
auto checkbox = new SettingsCheckBox(text, target, widget_label);
checkbox_layout->addWidget(checkbox);

View File

@ -40,6 +40,9 @@ class SettingsWidget : public Widget {
void UpdateLabel(const QString& text) {
if (label_) {
label_->setText(text);
label_->setVisible(true);
} else {
label_->setVisible(false);
}
}