implemented #92

This commit is contained in:
itsmattkc
2019-03-15 09:59:31 +11:00
parent 058e5b25c5
commit db22704169
27 changed files with 220 additions and 72 deletions
+14 -3
View File
@@ -7,11 +7,22 @@ LabelField::LabelField(EffectRow *parent, const QString &string) :
label_text_(string)
{}
QWidget *LabelField::CreateWidget()
QWidget *LabelField::CreateWidget(QWidget *existing)
{
QLabel* label = new QLabel(label_text_);
QLabel* label;
if (existing == nullptr) {
label = new QLabel(label_text_);
label->setEnabled(IsEnabled());
} else {
label = static_cast<QLabel*>(existing);
}
label->setEnabled(IsEnabled());
connect(this, SIGNAL(EnabledChanged(bool)), label, SLOT(setEnabled(bool)));
return label;