diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index a6223987c2..4a40dd7e29 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -1662,7 +1662,7 @@ void QWindow::show() bool isPopup = d_func()->windowFlags & Qt::Popup & ~Qt::Window; if (!isPopup && qApp->styleHints()->showIsFullScreen()) showFullScreen(); - else if (!isPopup && QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::ShowIsMaximized).toBool()) + else if (!isPopup && !(d_func()->windowFlags & Qt::Dialog & ~Qt::Window) && QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::ShowIsMaximized).toBool()) showMaximized(); else showNormal(); diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index a41d14e7d0..933294e21f 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -7012,7 +7012,7 @@ void QWidget::show() bool isPopup = data->window_flags & Qt::Popup & ~Qt::Window; if (isWindow() && !isPopup && qApp->styleHints()->showIsFullScreen()) showFullScreen(); - else if (isWindow() && !isPopup && QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::ShowIsMaximized).toBool()) + else if (isWindow() && !(data->window_flags & Qt::Dialog & ~Qt::Window) && !isPopup && QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::ShowIsMaximized).toBool()) showMaximized(); else setVisible(true);