summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
-rw-r--r--src/widgets/kernel/qwidget.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 5ec713140e..1b6f6b8f8f 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -6916,14 +6916,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);
@@ -8574,6 +8575,10 @@ void QWidget::focusOutEvent(QFocusEvent *)
{
if (focusPolicy() != Qt::NoFocus || !isWindow())
update();
+
+ // automatically hide the SIP
+ if (qApp->autoSipEnabled() && testAttribute(Qt::WA_InputMethodEnabled))
+ qApp->inputMethod()->hide();
}
/*!
@@ -9096,7 +9101,7 @@ QLayout *QWidget::layout() const
existing layout manager (returned by layout()) before you can
call setLayout() with the new layout.
- If \a layout is the layout manger on a different widget, setLayout()
+ If \a layout is the layout manager on a different widget, setLayout()
will reparent the layout and make it the layout manager for this widget.
Example: