Fix crash when hosting QQuickWidget
There's no need to check if invisible widgets are candidates for docking. There's usually no downside either, except that QQuickWidget is very sensitive with when its platform window is created, so don't force the creation. Will cherry-pick to 1.2 if no regression is found Fixes #150
This commit is contained in:
@@ -648,6 +648,10 @@ static QWidgetOrQuick *qtTopLevelForHWND(HWND hwnd)
|
||||
{
|
||||
const QList<QWindow*> windows = qApp->topLevelWindows();
|
||||
for (QWindow *window : windows) {
|
||||
if (!window->isVisible()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (hwnd == (HWND)window->winId()) {
|
||||
return DockRegistry::self()->topLevelForHandle(window);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user