From 4b0d6704d9e44b19c14958c031186ea17370755d Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 22 Feb 2017 12:21:46 +0100 Subject: DockWidgets: Allow to have floating dockwidgets side by side MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/widgets/widgets/qdockwidget.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/widgets/widgets/qdockwidget.cpp') 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(parentWidget()->parentWidget())) - return groupWindow->hasNativeDecos(); - } + if (auto groupWindow = + qobject_cast(parentWidget()->parentWidget())) + floating = floating || groupWindow->tabLayoutInfo(); return nativeWindowDeco(floating); } -- cgit v1.2.3