summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/fx/qfxwebview.cpp21
-rw-r--r--src/declarative/fx/qfxwebview.h1
2 files changed, 22 insertions, 0 deletions
diff --git a/src/declarative/fx/qfxwebview.cpp b/src/declarative/fx/qfxwebview.cpp
index 9fc469a..347c9c2 100644
--- a/src/declarative/fx/qfxwebview.cpp
+++ b/src/declarative/fx/qfxwebview.cpp
@@ -783,6 +783,27 @@ void QFxWebView::keyReleaseEvent(QKeyEvent* event)
QFxPaintedItem::keyReleaseEvent(event);
}
+bool QFxWebView::sceneEvent(QEvent *event)
+{
+ Q_D(const QFxWebView);
+
+ if (d->interactive) {
+ 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;
+ }
+ }
+ }
+ }
+ return QFxPaintedItem::sceneEvent(event);
+}
+
+
+
/*!
\qmlproperty action WebView::back
This property holds the action for causing the previous URL in the history to be displayed.
diff --git a/src/declarative/fx/qfxwebview.h b/src/declarative/fx/qfxwebview.h
index d84a01c..40c86b4 100644
--- a/src/declarative/fx/qfxwebview.h
+++ b/src/declarative/fx/qfxwebview.h
@@ -215,6 +215,7 @@ protected:
virtual void geometryChanged(const QRectF &newGeometry,
const QRectF &oldGeometry);
virtual void focusChanged(bool);
+ virtual bool sceneEvent(QEvent *event);
private:
void init();