diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2017-02-22 12:21:46 +0100 |
---|---|---|
committer | Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> | 2017-04-13 17:44:58 +0000 |
commit | 4b0d6704d9e44b19c14958c031186ea17370755d (patch) | |
tree | 9df10bac437b243980d1a5361d48849a625924ad /src/widgets/widgets/qdockwidget.cpp | |
parent | 60be2fb6a13315f074c3c0b7793c38632f291e8b (diff) |
DockWidgets: Allow to have floating dockwidgets side by side
Based on what MS VisualStudio can do, allow to have. We can now
drop the QDockWidgets on floating ones so that they are next to eachother
This is activated when QMainWindow::GroupedDragging and
QMainWindow::AllowNestedDocks are both set.
[ChangeLog][QtWidgets][QDockWidget] When QMainWindow::GrouppedDragging
and QMainWindow::AllowNestedDocks are both enabled, floating dock widgets
acquired the ability to be dropped together side by side.
Change-Id: I48765c72ef80ef15aa31b91ae582cbb01dea41d6
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Diffstat (limited to 'src/widgets/widgets/qdockwidget.cpp')
-rw-r--r-- | src/widgets/widgets/qdockwidget.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp index 2928d51d20..d25f4d922e 100644 --- a/src/widgets/widgets/qdockwidget.cpp +++ b/src/widgets/widgets/qdockwidget.cpp @@ -214,10 +214,9 @@ QDockWidgetLayout::~QDockWidgetLayout() bool QDockWidgetLayout::nativeWindowDeco() const { bool floating = parentWidget()->isWindow(); - if (!floating) { - if (auto groupWindow = qobject_cast<const QDockWidgetGroupWindow*>(parentWidget()->parentWidget())) - return groupWindow->hasNativeDecos(); - } + if (auto groupWindow = + qobject_cast<const QDockWidgetGroupWindow *>(parentWidget()->parentWidget())) + floating = floating || groupWindow->tabLayoutInfo(); return nativeWindowDeco(floating); } |