diff options
author | Michal Klocek <michal.klocek@theqtcompany.com> | 2015-03-23 09:52:08 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@theqtcompany.com> | 2015-06-01 06:36:50 +0000 |
commit | 6138e25290908372620e9d2ae70893b1b7ae3e08 (patch) | |
tree | d05d66e7161bf4df5e0d1585889a956361db4590 /src/controls/qquickpopupwindow_p.h | |
parent | 5430a8345938cb747591a69a8a3785c4ee11cd57 (diff) | |
download | qtquickcontrols-6138e25290908372620e9d2ae70893b1b7ae3e08.tar.gz |
Dismiss a popup window when touch occurs outside
QQuickWindow synthesizes mouse events only for touch points
which occur inside the window. This did not work correctly for
popup windows, which expect a mouse press outside the window
to dismiss the popup.
The workaround is to specifically wait for a TouchBegin outside
the popup to dismiss it.
Task-number: QTBUG-45079
Change-Id: I232220a3fe48c3193299a6a8313a6b9010dd4a53
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/controls/qquickpopupwindow_p.h')
-rw-r--r-- | src/controls/qquickpopupwindow_p.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/controls/qquickpopupwindow_p.h b/src/controls/qquickpopupwindow_p.h index 294a84f5..b95275c0 100644 --- a/src/controls/qquickpopupwindow_p.h +++ b/src/controls/qquickpopupwindow_p.h @@ -68,11 +68,12 @@ Q_SIGNALS: void geometryChanged(); protected: - void mousePressEvent(QMouseEvent *); - void mouseReleaseEvent(QMouseEvent *); - void mouseMoveEvent(QMouseEvent *); - void exposeEvent(QExposeEvent *); - void hideEvent(QHideEvent *); + void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE; + void mouseReleaseEvent(QMouseEvent *) Q_DECL_OVERRIDE; + void mouseMoveEvent(QMouseEvent *) Q_DECL_OVERRIDE; + void exposeEvent(QExposeEvent *) Q_DECL_OVERRIDE; + void hideEvent(QHideEvent *) Q_DECL_OVERRIDE; + bool event(QEvent *) Q_DECL_OVERRIDE; virtual bool shouldForwardEventAfterDismiss(QMouseEvent *) const; protected Q_SLOTS: |