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:
@@ -511,18 +511,17 @@ bool QMakeStep::fromMap(const QVariantMap &map)
|
||||
|
||||
QWidget *QMakeStep::createConfigWidget()
|
||||
{
|
||||
auto widget = new QWidget;
|
||||
|
||||
abisLabel = new QLabel(tr("ABIs:"), widget);
|
||||
abisLabel = new QLabel(tr("ABIs:"));
|
||||
abisLabel->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop);
|
||||
|
||||
abisListWidget = new QListWidget(widget);
|
||||
abisListWidget = new QListWidget;
|
||||
|
||||
LayoutBuilder builder(widget);
|
||||
Layouting::Form builder;
|
||||
builder.addRow(m_buildType);
|
||||
builder.addRow(m_userArgs);
|
||||
builder.addRow(m_effectiveCall);
|
||||
builder.addRow({abisLabel, abisListWidget});
|
||||
auto widget = builder.emerge(false);
|
||||
|
||||
qmakeBuildConfigChanged();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user