diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index b465ac36c7..b9aff2a58b 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -1516,7 +1516,8 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO q->setAttribute(Qt::WA_OutsideWSRange, true); } else if (q->isVisible()) { // If widget is already shown, set window visible, too - win->setVisible(true); + QWidgetWindow *widgetWindow = qobject_cast(win); + widgetWindow->setNativeWindowVisibility(true); } }