forked from qt-creator/qt-creator
Utils: Avoid intermediate widgets when using LayoutBuilder
In most cases, the layout constructed in the builder was set on a widget which in turn was put into a vbox in the actual widget. This is not necessary, but needs some re-ordering. Also make sure that using not-yet-parented widgets during layout construction does not cause visible artifacts. Change-Id: I75727a571da093d3131ea6fba467c2c646cdb6f1 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -170,8 +170,7 @@ DebuggerRunConfigurationAspect::DebuggerRunConfigurationAspect(Target *target)
|
||||
setDisplayName(tr("Debugger settings"));
|
||||
|
||||
setConfigWidgetCreator([this] {
|
||||
QWidget *w = new QWidget;
|
||||
LayoutBuilder builder(w);
|
||||
Layouting::Form builder;
|
||||
builder.addRow(m_cppAspect);
|
||||
builder.addRow(m_qmlAspect);
|
||||
builder.addRow(m_overrideStartupAspect);
|
||||
@@ -179,8 +178,7 @@ DebuggerRunConfigurationAspect::DebuggerRunConfigurationAspect(Target *target)
|
||||
static const QByteArray env = qgetenv("QTC_DEBUGGER_MULTIPROCESS");
|
||||
if (env.toInt())
|
||||
builder.addRow(m_multiProcessAspect);
|
||||
|
||||
return w;
|
||||
return builder.emerge(false);
|
||||
});
|
||||
|
||||
m_cppAspect = new DebuggerLanguageAspect;
|
||||
|
||||
Reference in New Issue
Block a user