diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-05-18 09:06:06 (GMT) |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-05-18 09:06:06 (GMT) |
commit | 76504e5e5ee51665ddd37d36e220c9266d84aa53 (patch) | |
tree | d5225e5cc8f3c683134b054c314869a29df9a94b /tools/designer/src/components | |
parent | 7133b932ac2af6e5a09323f09ee8024d0042bce3 (diff) | |
download | Qt-76504e5e5ee51665ddd37d36e220c9266d84aa53.zip Qt-76504e5e5ee51665ddd37d36e220c9266d84aa53.tar.gz Qt-76504e5e5ee51665ddd37d36e220c9266d84aa53.tar.bz2 |
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/src/components')
-rw-r--r-- | tools/designer/src/components/formeditor/formwindow_widgetstack.cpp | 6 | ||||
-rw-r--r-- | tools/designer/src/components/formeditor/formwindow_widgetstack.h | 3 |
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 7270628..58127b0 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 92323c5..f21c4f0 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; }; |