Utils: Introduce a SelectionAspect::volatileChanged

Analog to BoolAspect::volatileChanged for cases when the availability
of some other aspect, line edit, ... is governed by a specific state
of a combobox.

Change-Id: I5c7903dde21ab997e799568b20a01308a25c4397
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2021-04-01 09:20:49 +02:00
parent 19d078bb5c
commit 968d083631
2 changed files with 5 additions and 0 deletions

View File

@@ -1390,6 +1390,8 @@ void SelectionAspect::addToLayout(LayoutBuilder &builder)
connect(d->m_comboBox.data(), QOverload<int>::of(&QComboBox::activated),
this, &SelectionAspect::setValue);
}
connect(d->m_comboBox.data(), QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &SelectionAspect::volatileValueChanged);
d->m_comboBox->setCurrentIndex(value());
addLabeledItem(builder, d->m_comboBox);
break;