Fix z-order when dragging a dock widget over another

the drop target would create a floating group window, which would
have higher z-order since it just had show() called on it.

raise the window we're dragging when the target is mutated into group
window.

Bug can be seen on the .gif attached to QTBUG-67611.

Change-Id: I5dad058468e24327b14d1e7f76c3ad0287d26ee8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
Sergio Martins 2018-04-10 18:30:15 +01:00 committed by Sérgio Martins
parent 297957c4d5
commit a553e2f6b5

View File

@ -2559,6 +2559,7 @@ void QMainWindowLayout::hover(QLayoutItem *widgetItem, const QPoint &mousePos)
dropTo->show();
dropTo->d_func()->plug(QRect());
w = floatingTabs;
widget->raise(); // raise, as our newly created drop target is now on top
}
Q_ASSERT(qobject_cast<QDockWidgetGroupWindow *>(w));
auto group = static_cast<QDockWidgetGroupWindow *>(w);