summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-27 19:54:12 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-27 19:54:12 (GMT)
commitf79ea0ecc9ebca896340babd370638a6cf607419 (patch)
tree62d6ed203fa855bcb7b094f910a7e494bf382d1f /src
parent41fbe7440778f36afe85608d1198c96de387148f (diff)
parent0974f78058e8d05d403d77a8a5e2b11b114b7c5e (diff)
downloadQt-f79ea0ecc9ebca896340babd370638a6cf607419.zip
Qt-f79ea0ecc9ebca896340babd370638a6cf607419.tar.gz
Qt-f79ea0ecc9ebca896340babd370638a6cf607419.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: Tweak aesthetics of QML viewer inside QtDemo Add key event handling to the declarative web view Improve gradient docs
Diffstat (limited to 'src')
-rw-r--r--src/declarative/graphicsitems/qdeclarativerectangle.cpp4
-rw-r--r--src/imports/webkit/qdeclarativewebview.cpp21
2 files changed, 12 insertions, 13 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
index 4f7a722..301ca00 100644
--- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
@@ -116,6 +116,10 @@ void QDeclarativeGradientStop::updateGradient()
\snippet doc/src/snippets/declarative/gradient.qml code
+ Note that this item is not a visual representation of a gradient. To display a
+ gradient use a visual item (like rectangle) which supports having a gradient set
+ on it for display.
+
\sa GradientStop
*/
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);
-}
+}
/*!