diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2015-01-29 12:06:28 +0100 |
---|---|---|
committer | Andras Becsi <andras.becsi@theqtcompany.com> | 2015-02-05 13:10:41 +0000 |
commit | faec509a21b4700dbf271c4dcbb3a993f1c4042f (patch) | |
tree | dd16a33ab7070ab52e34843f666f1e6c87fdc5bf /tools/buildscripts/qtwebengine_utils.py | |
parent | 0622e02b9da5b93c6824367732970af0214601fb (diff) | |
download | qtwebengine-faec509a21b4700dbf271c4dcbb3a993f1c4042f.tar.gz |
Propagate unhandled key events to the QtWebEngine view's parent
This allows applications to receive unhandled key events from the page
by setting an event handler on the view's parent widget/item, like
it was possible with QtWebKit.
This is different in that events first have to asynchronously go
through the QtWebEngineProcess. If the WebEngine view has the
keyboard focus, the events will be consumed inconditionally by the
RenderWidgetHostViewQtDelegates, and a copy will be resent to the
view's parent if it wasn't consumed.
This sends it to the parent instead of the QWebEngineView directly
since those are only unhandled events, unlike with other widgets
where you can first intercept events. It is done that way also in
cases where the QWebEngineView would be be the focus widget directly
in the future, instead of the RWHV.
If applications want to intercept key events before they reach the
page, they need to use an event filter on the QWebEngineView's
children or globally on the application.
Change-Id: I3b48f5212d3f238a1c0497cec1db6ae3badbad26
Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'tools/buildscripts/qtwebengine_utils.py')
0 files changed, 0 insertions, 0 deletions