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:
hjk
2021-03-11 19:02:42 +01:00
parent 4151f091e3
commit 035a6ff031
25 changed files with 401 additions and 365 deletions

View File

@@ -87,7 +87,8 @@ GdbOptionsPageWidget::GdbOptionsPageWidget()
Column commands {
Group { Title { tr("Additional Startup Commands") }, s.gdbStartupCommands },
Group { Title { tr("Additional Attach Commands") }, s.gdbPostAttachCommands }
Group { Title { tr("Additional Attach Commands") }, s.gdbPostAttachCommands },
Stretch()
};
Row { general, commands }.attachTo(this);
@@ -128,7 +129,7 @@ GdbOptionsPageWidget2::GdbOptionsPageWidget2()
using namespace Layouting;
DebuggerSettings &s = *debuggerSettings();
Group {
Group extended {
Title(GdbOptionsPage::tr("Extended")),
labelDangerous,
s.targetAsync,
@@ -138,7 +139,9 @@ GdbOptionsPageWidget2::GdbOptionsPageWidget2()
s.breakOnAbort,
s.enableReverseDebugging,
s.multiInferior,
}.attachTo(this);
};
Column { extended, Stretch() }.attachTo(this);
}
// The "Dangerous" options.