Allow to drag a QDockWidgetGroupWindow into one of its QDockWidget

This fixes the 2. of QTBUG-52108

Change-Id: Id887f470c7822f6b264d6b739e8658d9809f6609
Task-numer: QTBUG-52108
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
bb10
Olivier Goffart 2016-06-24 15:49:28 +02:00 committed by Olivier Goffart (Woboq GmbH)
parent 27df6cb32d
commit 9cb8ca2b55
1 changed files with 2 additions and 5 deletions

View File

@ -2366,13 +2366,10 @@ void QMainWindowLayout::hover(QLayoutItem *widgetItem, const QPoint &mousePos)
QWidget *w = qobject_cast<QWidget*>(c);
if (!w)
continue;
if (w == widget)
continue;
if (!w->isTopLevel() || !w->isVisible() || w->isMinimized())
continue;
if (!qobject_cast<QDockWidget*>(w) && !qobject_cast<QDockWidgetGroupWindow *>(w))
continue;
candidates << w;
if (w != widget && w->isTopLevel() && w->isVisible() && !w->isMinimized())
candidates << w;
if (QDockWidgetGroupWindow *group = qobject_cast<QDockWidgetGroupWindow *>(w)) {
// Sometimes, there are floating QDockWidget that have a QDockWidgetGroupWindow as a parent.
foreach (QObject *c, group->children()) {