diff options
author | Sergio Ahumada <sahumada@blackberry.com> | 2014-03-15 19:10:27 +0100 |
---|---|---|
committer | Sergio Ahumada <sahumada@blackberry.com> | 2014-03-15 19:11:13 +0100 |
commit | 2874e074ca8cd1f9c8975728afa04a28ea3790ee (patch) | |
tree | ee09f7d165983898bec115bfb55470e0fa6eb41a | |
parent | d909863056d02e206d5daf614a481c30de0e3a16 (diff) | |
parent | 76ec5710d544dd19ef13c467bfcb1e441af56499 (diff) | |
download | qtquickcontrols-2874e074ca8cd1f9c8975728afa04a28ea3790ee.tar.gz |
Merge remote-tracking branch 'origin/release' into stable
Change-Id: Ib619455982ebb154ba5344765b11da5c04091409
-rw-r--r-- | src/controls/qquickpopupwindow.cpp | 8 | ||||
-rw-r--r-- | src/controls/qquickpopupwindow_p.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/controls/qquickpopupwindow.cpp b/src/controls/qquickpopupwindow.cpp index efc378b6..27f4b34a 100644 --- a/src/controls/qquickpopupwindow.cpp +++ b/src/controls/qquickpopupwindow.cpp @@ -54,6 +54,14 @@ QQuickPopupWindow::QQuickPopupWindow() : { setFlags(Qt::Popup); setModality(Qt::ApplicationModal); + connect(qApp, SIGNAL(applicationStateChanged(Qt::ApplicationState)), + this, SLOT(applicationStateChanged(Qt::ApplicationState))); +} + +void QQuickPopupWindow::applicationStateChanged(Qt::ApplicationState state) +{ + if (state != Qt::ApplicationActive) + dismissPopup(); } void QQuickPopupWindow::show() diff --git a/src/controls/qquickpopupwindow_p.h b/src/controls/qquickpopupwindow_p.h index 1329a547..d48a375e 100644 --- a/src/controls/qquickpopupwindow_p.h +++ b/src/controls/qquickpopupwindow_p.h @@ -81,6 +81,7 @@ protected: protected Q_SLOTS: void updateSize(); + void applicationStateChanged(Qt::ApplicationState state); private: void forwardEventToTransientParent(QMouseEvent *); |