diff --git a/src/plugins/qtsupport/qtbuildaspects.cpp b/src/plugins/qtsupport/qtbuildaspects.cpp index 00dd4633dc1..e2000048fed 100644 --- a/src/plugins/qtsupport/qtbuildaspects.cpp +++ b/src/plugins/qtsupport/qtbuildaspects.cpp @@ -52,7 +52,7 @@ QmlDebuggingAspect::QmlDebuggingAspect() void QmlDebuggingAspect::addToLayout(LayoutBuilder &builder) { SelectionAspect::addToLayout(builder); - const auto warningLabel = new Utils::InfoLabel({}, Utils::InfoLabel::Warning); + const auto warningLabel = createSubWidget(QString(), InfoLabel::Warning); warningLabel->setElideMode(Qt::ElideNone); builder.addRow({{}, warningLabel}); const auto changeHandler = [this, warningLabel] { @@ -85,7 +85,7 @@ QtQuickCompilerAspect::QtQuickCompilerAspect() void QtQuickCompilerAspect::addToLayout(LayoutBuilder &builder) { SelectionAspect::addToLayout(builder); - const auto warningLabel = new Utils::InfoLabel({}, Utils::InfoLabel::Warning); + const auto warningLabel = createSubWidget(QString(), InfoLabel::Warning); warningLabel->setElideMode(Qt::ElideNone); warningLabel->setVisible(false); builder.addRow({{}, warningLabel});