summaryrefslogtreecommitdiffstats
path: root/tools/designer/src/lib/uilib/formbuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/designer/src/lib/uilib/formbuilder.cpp')
-rw-r--r--tools/designer/src/lib/uilib/formbuilder.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/designer/src/lib/uilib/formbuilder.cpp b/tools/designer/src/lib/uilib/formbuilder.cpp
index 0a722ba..2de8388 100644
--- a/tools/designer/src/lib/uilib/formbuilder.cpp
+++ b/tools/designer/src/lib/uilib/formbuilder.cpp
@@ -123,6 +123,8 @@ QWidget *QFormBuilder::create(DomWidget *ui_widget, QWidget *parentWidget)
QFormBuilderExtra *fb = QFormBuilderExtra::instance(this);
if (!fb->parentWidgetIsSet())
fb->setParentWidget(parentWidget);
+ // Is this a QLayoutWidget with a margin of 0: Not a known page-based
+ // container and no method for adding pages registered.
fb->setProcessingLayoutWidget(false);
if (ui_widget->attributeClass() == QFormBuilderStrings::instance().qWidgetClass && !ui_widget->hasAttributeNative()
&& parentWidget
@@ -147,8 +149,11 @@ QWidget *QFormBuilder::create(DomWidget *ui_widget, QWidget *parentWidget)
#ifndef QT_NO_DOCKWIDGET
&& !qobject_cast<QDockWidget *>(parentWidget)
#endif
- )
- fb->setProcessingLayoutWidget(true);
+ ) {
+ const QString parentClassName = QLatin1String(parentWidget->metaObject()->className());
+ if (!fb->isCustomWidgetContainer(parentClassName))
+ fb->setProcessingLayoutWidget(true);
+ }
return QAbstractFormBuilder::create(ui_widget, parentWidget);
}