diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-05-31 05:23:40 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-05-31 05:23:40 (GMT) |
commit | f587dfeaa9d369235d347af3d14339054ee59908 (patch) | |
tree | 3ac92f6a08d871099d8808e8d5fc59f50863bacb /src/imports/webkit/qdeclarativewebview.cpp | |
parent | feb9949a11abbf244e0bfcdc128981596758de40 (diff) | |
parent | 9da305aedfaa5da5a3059c99ac5a5389dab42b10 (diff) | |
download | Qt-f587dfeaa9d369235d347af3d14339054ee59908.zip Qt-f587dfeaa9d369235d347af3d14339054ee59908.tar.gz Qt-f587dfeaa9d369235d347af3d14339054ee59908.tar.bz2 |
Merge remote branch 'staging/4.7' into HEAD
Diffstat (limited to 'src/imports/webkit/qdeclarativewebview.cpp')
-rw-r--r-- | src/imports/webkit/qdeclarativewebview.cpp | 21 |
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); -} +} /*! |