diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2016-06-01 17:54:49 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2016-08-09 06:29:08 +0000 |
commit | 6534b09073791398bad99863821740e986915bff (patch) | |
tree | 1d2476d387e75d691d112f71f74f9094b25cbd8a /src/webengine/api/qquickwebenginesettings_p.h | |
parent | 521c3f6c47e3e7e284eaaca40c1820fbcb1b56e0 (diff) |
Add focusOnNavigationEnabled setting
The focusOnNavigationEnabled setting allows changing the behavior of
whether a WebEngine view (widget or quick) will automatically get
focus, whenever a navigation action happens (load, reload, previous
history entry, etc).
The default behavior before this patch was to always grab the focus.
[ChangeLog][QtWebEngine][General] Add focusOnNavigationEnabled setting
which allows controlling whether a web view will receive focus on a
navigation request. Previously the view always received the focus.
Task-number: QTBUG-52999
Change-Id: I6d30d973a41b53011131f21dcecbf6ec4d652759
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/webengine/api/qquickwebenginesettings_p.h')
-rw-r--r-- | src/webengine/api/qquickwebenginesettings_p.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/webengine/api/qquickwebenginesettings_p.h b/src/webengine/api/qquickwebenginesettings_p.h index 584027260..2675630f8 100644 --- a/src/webengine/api/qquickwebenginesettings_p.h +++ b/src/webengine/api/qquickwebenginesettings_p.h @@ -82,6 +82,7 @@ class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineSettings : public QObject { Q_PROPERTY(bool accelerated2dCanvasEnabled READ accelerated2dCanvasEnabled WRITE setAccelerated2dCanvasEnabled NOTIFY accelerated2dCanvasEnabledChanged REVISION 2) Q_PROPERTY(bool autoLoadIconsForPage READ autoLoadIconsForPage WRITE setAutoLoadIconsForPage NOTIFY autoLoadIconsForPageChanged REVISION 2) Q_PROPERTY(bool touchIconsEnabled READ touchIconsEnabled WRITE setTouchIconsEnabled NOTIFY touchIconsEnabledChanged REVISION 2) + Q_PROPERTY(bool focusOnNavigationEnabled READ focusOnNavigationEnabled WRITE setFocusOnNavigationEnabled NOTIFY focusOnNavigationEnabledChanged REVISION 3) public: ~QQuickWebEngineSettings(); @@ -105,6 +106,7 @@ public: bool accelerated2dCanvasEnabled() const; bool autoLoadIconsForPage() const; bool touchIconsEnabled() const; + bool focusOnNavigationEnabled() const; void setAutoLoadImages(bool on); void setJavascriptEnabled(bool on); @@ -125,6 +127,7 @@ public: void setAccelerated2dCanvasEnabled(bool on); void setAutoLoadIconsForPage(bool on); void setTouchIconsEnabled(bool on); + void setFocusOnNavigationEnabled(bool on); signals: void autoLoadImagesChanged(); @@ -146,6 +149,7 @@ signals: Q_REVISION(2) void accelerated2dCanvasEnabledChanged(); Q_REVISION(2) void autoLoadIconsForPageChanged(); Q_REVISION(2) void touchIconsEnabledChanged(); + Q_REVISION(3) void focusOnNavigationEnabledChanged(); private: explicit QQuickWebEngineSettings(QQuickWebEngineSettings *parentSettings = 0); |