diff options
author | Debao Zhang <dbzhang800@gmail.com> | 2011-12-23 00:27:32 +0800 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-07 19:52:27 +0100 |
commit | b7915a4d0d97a60fc30e55eb4cc1b10e7fe9ce2f (patch) | |
tree | 955404d8d6d277e8ab9cd8295191144ef68a1aa3 /tests/auto/widgets | |
parent | eb709333989a7e3d8eb662a0e167ac81ca19d882 (diff) |
Fix dockwidgets behavior when window resized or central widgets is set.
When adding and showing a central widget in a QMainWindow then the
layout does not respect the size policy of the central widget.
This is a side effect of 059be19781a22d2e41f22072152589857d0fabf9
After the layout of QMainWindow is restored or the separator between central
widget and dock widgets is moved by user, dock widgets should keep their
size when the window if resized.
Task-number: QTBUG-15689
Change-Id: Idfccb7b4ae057a99f431c2ed54e3b9fcfb6ef54c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'tests/auto/widgets')
-rw-r--r-- | tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp index 0f07546559..c6a039cb37 100644 --- a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp +++ b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp @@ -1435,6 +1435,11 @@ void MoveSeparator::apply(QMainWindow *mw) const } QVERIFY(!path.isEmpty()); + // For QTBUG-15689: + // Following commands is used to simulate user move action. A better way should + // use QMainWindowLayout::startSeparatorMove/separatorMove/endSeparatorMove, + // but then we will need real start/end position coordinates. + l->layoutState.dockAreaLayout.fallbackToSizeHints = false; l->layoutState.dockAreaLayout.separatorMove(path, QPoint(0, 0), QPoint(delta, delta)); } #endif |