summaryrefslogtreecommitdiff
path: root/tools/designer
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-05-18 11:06:06 +0200
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-05-18 11:06:06 +0200
commit76504e5e5ee51665ddd37d36e220c9266d84aa53 (patch)
treed5225e5cc8f3c683134b054c314869a29df9a94b /tools/designer
parent7133b932ac2af6e5a09323f09ee8024d0042bce3 (diff)
downloadqt4-tools-76504e5e5ee51665ddd37d36e220c9266d84aa53.tar.gz
Fixed a bug caused by forms with a sizepolicy of 'Fixed' on the main container.
Restore 4.4 behaviour by using a QStackedLayout as the layout containing the actual form (as was in 4.4). The difference in behaviour was caused by insertion of an additional widget with a QVBoxLayout which is supposed to ease setting of inheritable properties (style, etc). Reviewed-by: Kai Köhne <kai.koehne@nokia.com> Task-number: 253236
Diffstat (limited to 'tools/designer')
-rw-r--r--tools/designer/src/components/formeditor/formwindow_widgetstack.cpp6
-rw-r--r--tools/designer/src/components/formeditor/formwindow_widgetstack.h3
2 files changed, 6 insertions, 3 deletions
diff --git a/tools/designer/src/components/formeditor/formwindow_widgetstack.cpp b/tools/designer/src/components/formeditor/formwindow_widgetstack.cpp
index 72706280aa..58127b0d85 100644
--- a/tools/designer/src/components/formeditor/formwindow_widgetstack.cpp
+++ b/tools/designer/src/components/formeditor/formwindow_widgetstack.cpp
@@ -57,16 +57,20 @@ using namespace qdesigner_internal;
FormWindowWidgetStack::FormWindowWidgetStack(QObject *parent) :
QObject(parent),
m_formContainer(new QWidget),
- m_formContainerLayout(new QVBoxLayout),
+ m_formContainerLayout(new QStackedLayout),
m_layout(new QStackedLayout)
{
m_layout->setMargin(0);
m_layout->setSpacing(0);
m_layout->setStackingMode(QStackedLayout::StackAll);
+ // We choose a QStackedLayout as immediate layout for
+ // the form windows as it ignores the sizePolicy of
+ // its child (for example, Fixed would cause undesired side effects).
m_formContainerLayout->setMargin(0);
m_formContainer->setObjectName(QLatin1String("formContainer"));
m_formContainer->setLayout(m_formContainerLayout);
+ m_formContainerLayout->setStackingMode(QStackedLayout::StackAll);
// System settings might have different background colors, autofill them
// (affects for example mainwindow status bars)
m_formContainer->setAutoFillBackground(true);
diff --git a/tools/designer/src/components/formeditor/formwindow_widgetstack.h b/tools/designer/src/components/formeditor/formwindow_widgetstack.h
index 92323c5a63..f21c4f0b98 100644
--- a/tools/designer/src/components/formeditor/formwindow_widgetstack.h
+++ b/tools/designer/src/components/formeditor/formwindow_widgetstack.h
@@ -51,7 +51,6 @@ QT_BEGIN_NAMESPACE
class QDesignerFormWindowToolInterface;
class QStackedLayout;
-class QVBoxLayout;
class QWidget;
namespace qdesigner_internal {
@@ -92,7 +91,7 @@ protected:
private:
QList<QDesignerFormWindowToolInterface*> m_tools;
QWidget *m_formContainer;
- QVBoxLayout *m_formContainerLayout;
+ QStackedLayout *m_formContainerLayout;
QStackedLayout *m_layout;
};