diff options
author | Zeno Albisser <zeno.albisser@digia.com> | 2014-01-31 17:24:40 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-10 21:36:04 +0100 |
commit | 331b7fa11c84107e3300b14ece5fc5991cfc35e9 (patch) | |
tree | 6f47e11a32de6ef190667d0c12d92f9649e16b03 /src/webengine/render_widget_host_view_qt_delegate_quick.h | |
parent | 28acdd2ad14d3a5fecc51b5b4bc9d05b6f80dbb5 (diff) |
Add TakeFocus in WebContentsViewQt for passing on tab focus.
Chromium calls RenderViewHostDelegate::TakeFocus when the
last focusable item within the page was reached.
We then have to move the focus on to the next/previous
QQuickItem.
Change-Id: Id0128053602ff1220c1bced1b218050b66fef659
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'src/webengine/render_widget_host_view_qt_delegate_quick.h')
-rw-r--r-- | src/webengine/render_widget_host_view_qt_delegate_quick.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.h b/src/webengine/render_widget_host_view_qt_delegate_quick.h index 9dbe79941..8f32689d0 100644 --- a/src/webengine/render_widget_host_view_qt_delegate_quick.h +++ b/src/webengine/render_widget_host_view_qt_delegate_quick.h @@ -60,6 +60,10 @@ public: : ItemBaseT(parent) , m_client(client) { + this->setFocus(true); + this->setActiveFocusOnTab(true); + this->setFlag(QQuickItem::ItemIsFocusScope); + this->setAcceptedMouseButtons(Qt::AllButtons); this->setAcceptHoverEvents(true); } @@ -143,7 +147,7 @@ public: void mousePressEvent(QMouseEvent *event) { - this->setFocus(true); + this->forceActiveFocus(); m_client->forwardEvent(event); } |