forked from qt-creator/qt-creator
Utils: Improve handling of BoolAspects used for checked QGroupBoxes
Make the group box a registered subwidget of the BoolAspect, so it properly triggers the necessary behavior in BaseAspect::isDirty. Change-Id: I9f6291d87ef7ce4067e0d235de8b5be24de79a93 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -451,9 +451,8 @@ Group::Group(std::initializer_list<LayoutItem> items)
|
||||
box->setObjectName(item.specialValue.toString());
|
||||
if (auto check = qobject_cast<BoolAspect *>(item.aspect)) {
|
||||
box->setCheckable(true);
|
||||
QObject::connect(box, &QGroupBox::clicked, box, [check](bool on) {
|
||||
check->setValue(on);
|
||||
});
|
||||
box->setChecked(check->value());
|
||||
check->setHandlesGroup(box);
|
||||
}
|
||||
} else {
|
||||
builder.addItem(item);
|
||||
|
||||
Reference in New Issue
Block a user