diff options
author | Martin Smith <martin.smith@nokia.com> | 2010-05-28 13:17:48 (GMT) |
---|---|---|
committer | Martin Smith <martin.smith@nokia.com> | 2010-05-28 13:17:48 (GMT) |
commit | 19fc2c24f02ecef0c9a466d5351aa44ceb973bf3 (patch) | |
tree | 63e64d36f718517e558317276a0e9804e9889640 /src/imports | |
parent | b0b4ca6547807fc602176c1ad262f15f6858116a (diff) | |
parent | 71425f24893fecb15cd4d01e6dc3d391051e9d6b (diff) | |
download | Qt-19fc2c24f02ecef0c9a466d5351aa44ceb973bf3.zip Qt-19fc2c24f02ecef0c9a466d5351aa44ceb973bf3.tar.gz Qt-19fc2c24f02ecef0c9a466d5351aa44ceb973bf3.tar.bz2 |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'src/imports')
-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); -} +} /*! |