Change QLabel from StringAspect to ElidingLabel

ElidingLabel with elided mode set other than Qt::ElideNone will not show
in case QFormLayout has QFormLayout::ExpandingFieldsGrow field growth
policy

Change-Id: I26db57fbeb2c921e054cf7dc18229ebddcb04530
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Sergey Levin
2021-12-01 17:18:03 +03:00
parent e545e8fdbb
commit 44ff85cb1b
3 changed files with 16 additions and 3 deletions

View File

@@ -111,7 +111,7 @@ static QLayout *createLayoutFromType(LayoutBuilder::LayoutType layoutType)
switch (layoutType) {
case LayoutBuilder::FormLayout: {
auto formLayout = new QFormLayout;
formLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
return formLayout;
}
case LayoutBuilder::GridLayout: {