diff options
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 8 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 7 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index bf9d847eb0..f55e337334 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -1436,13 +1436,15 @@ QObject *QWindow::focusObject() const Shows the window. This equivalent to calling showFullScreen() or showNormal(), depending - on whether the platform defaults to windows being fullscreen or not. + on whether the platform defaults to windows being fullscreen or not, and + whether the window is a popup. - \sa showFullScreen(), showNormal(), hide(), QStyleHints::showIsFullScreen() + \sa showFullScreen(), showNormal(), hide(), QStyleHints::showIsFullScreen(), flags() */ void QWindow::show() { - if (qApp->styleHints()->showIsFullScreen()) + bool isPopup = d_func()->windowFlags & Qt::Popup & ~Qt::Window; + if (!isPopup && qApp->styleHints()->showIsFullScreen()) showFullScreen(); else showNormal(); diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 0db1eab90d..31f6af5dce 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -6908,14 +6908,15 @@ void QWidget::setUpdatesEnabled(bool enable) Shows the widget and its child widgets. This function is equivalent to setVisible(true) in the normal case, and equivalent to showFullScreen() if the QStyleHints::showIsFullScreen() hint - is true. + is true and the window is not a popup. \sa raise(), showEvent(), hide(), setVisible(), showMinimized(), showMaximized(), - showNormal(), isVisible() + showNormal(), isVisible(), windowFlags() */ void QWidget::show() { - if (isWindow() && qApp->styleHints()->showIsFullScreen()) + bool isPopup = data->window_flags & Qt::Popup & ~Qt::Window; + if (isWindow() && !isPopup && qApp->styleHints()->showIsFullScreen()) showFullScreen(); else setVisible(true); |