Kit aspects: Make sure to always use createSubWidget()

... to create sub-widgets.
Otherwise, parts of the aspect will stay visible when it gets hidden.

Change-Id: I967ef745348c10f7b5e78d726efcdb9c6005f887
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2024-12-10 16:04:34 +01:00
parent 248cd3ce08
commit 594edc49dc
2 changed files with 3 additions and 3 deletions

View File

@@ -99,9 +99,9 @@ private:
{
if (const QList<KitAspect *> embedded = aspectsToEmbed(); !embedded.isEmpty()) {
Layouting::Layout box(new QHBoxLayout);
box.addItem(Tr::tr("Type:"));
box.addItem(createSubWidget<QLabel>(Tr::tr("Type:")));
embedded.first()->addToInnerLayout(box);
box.addItem(Tr::tr("Device:"));
box.addItem(createSubWidget<QLabel>(Tr::tr("Device:")));
KitAspect::addToInnerLayout(box);
QSizePolicy p = comboBoxes().first()->sizePolicy();
p.setHorizontalStretch(1);

View File

@@ -95,7 +95,7 @@ private:
QSizePolicy p = comboBoxes().first()->sizePolicy();
p.setHorizontalStretch(2);
comboBoxes().first()->setSizePolicy(p);
box.addItem(Tr::tr("Mkspec:"));
box.addItem(createSubWidget<QLabel>(Tr::tr("Mkspec:")));
embedded.first()->addToInnerLayout(box);
layout.addItem(box);
} else {