diff options
author | Richard Moe Gustavsen <richard.gustavsen@digia.com> | 2013-06-19 11:21:14 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-06-25 15:11:02 +0200 |
commit | 438211ec627073817fcaf6d3a07b76f2aa5d90e0 (patch) | |
tree | 9eb64a4d4a6a21d1c87db038724ab823df1b6d10 /src/widgets/kernel/qapplication_p.h | |
parent | a3b5947d3623ac3da4ee21056214835f1e5c06da (diff) |
QPlatformIntegration: add new style hint: SetFocusOnTouchRelease
On desktop platforms, widgets have traditionally received
focus on mouse press. On touch platforms (iOS, Android) this
is different, there you need to delay setting the focus
until a touch release (probably to check if the press starts
a flick or tap'n'hold etc).
This patch will add a new style hint SetFocusOnRelease that
can be set by the plugin to control this behavior in Qt.
Change-Id: I2e4d714894e327822c855eb48a3b28e354726e95
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Diffstat (limited to 'src/widgets/kernel/qapplication_p.h')
-rw-r--r-- | src/widgets/kernel/qapplication_p.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h index 87cf259ba5..29c6902c78 100644 --- a/src/widgets/kernel/qapplication_p.h +++ b/src/widgets/kernel/qapplication_p.h @@ -294,9 +294,7 @@ public: private: static QApplicationPrivate *self; - static void giveFocusAccordingToFocusPolicy(QWidget *w, - Qt::FocusPolicy focusPolicy, - Qt::FocusReason focusReason); + static void giveFocusAccordingToFocusPolicy(QWidget *w, QEvent *event, QPoint localPos); static bool shouldSetFocus(QWidget *w, Qt::FocusPolicy policy); |