summaryrefslogtreecommitdiffstats
path: root/src/imports/webkit/qdeclarativewebview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/webkit/qdeclarativewebview.cpp')
-rw-r--r--src/imports/webkit/qdeclarativewebview.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/imports/webkit/qdeclarativewebview.cpp b/src/imports/webkit/qdeclarativewebview.cpp
index 36a25f6..050e2b7 100644
--- a/src/imports/webkit/qdeclarativewebview.cpp
+++ b/src/imports/webkit/qdeclarativewebview.cpp
@@ -150,6 +150,9 @@ public:
The item includes no scrolling, scaling,
toolbars, etc., those must be implemented around WebView. See the WebBrowser example
for a demonstration of this.
+
+ When this item has keyboard focus, all keyboard input will be sent directly to the
+ web page within.
*/
/*!
@@ -701,20 +704,12 @@ void QDeclarativeWebView::hoverMoveEvent (QGraphicsSceneHoverEvent * event)
QDeclarativeItem::hoverMoveEvent(event);
}
-bool QDeclarativeWebView::sceneEvent(QEvent *event)
-{
- if (event->type() == QEvent::KeyPress) {
- QKeyEvent *k = static_cast<QKeyEvent *>(event);
- if (k->key() == Qt::Key_Tab || k->key() == Qt::Key_Backtab) {
- if (!(k->modifiers() & (Qt::ControlModifier | Qt::AltModifier))) { //### Add MetaModifier?
- page()->event(event);
- if (event->isAccepted())
- return true;
- }
- }
- }
+bool QDeclarativeWebView::sceneEvent(QEvent *event)
+{
+ if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease)//Key events go to the page
+ return page()->event(event);
return QDeclarativeItem::sceneEvent(event);
-}
+}
/*!