summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-03-04 03:32:13 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-03-04 03:32:13 (GMT)
commitfafc3f1689b43c5504e0f5c7f7a661e5ddf82290 (patch)
tree5269eb3deb9ee41f3591e0daa05eff016b3f01d2
parentc425733907910ad04ed3abdefb5108d682858b12 (diff)
parent08cf6561c4ad2288e385e63d941b60b268cc484e (diff)
downloadQt-fafc3f1689b43c5504e0f5c7f7a661e5ddf82290.zip
Qt-fafc3f1689b43c5504e0f5c7f7a661e5ddf82290.tar.gz
Qt-fafc3f1689b43c5504e0f5c7f7a661e5ddf82290.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/qt-qml into 4.7
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp5
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp5
-rw-r--r--src/declarative/util/qdeclarativeview.cpp2
3 files changed, 12 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index 5b313be..a6f3d8f 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -697,6 +697,11 @@ void QDeclarativeGridViewPrivate::updateCurrent(int modelIndex)
In this case ListModel is a handy way for us to test our UI. In practice
the model would be implemented in C++, or perhaps via a SQL data source.
+
+ Note that views do not enable \e clip automatically. If the view
+ is not clipped by another item or the screen, it will be necessary
+ to set \e {clip: true} in order to have the out of view items clipped
+ nicely.
*/
QDeclarativeGridView::QDeclarativeGridView(QDeclarativeItem *parent)
: QDeclarativeFlickable(*(new QDeclarativeGridViewPrivate), parent)
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index eb5315d..a5da424 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -1359,6 +1359,11 @@ void QDeclarativeListViewPrivate::flickY(qreal velocity)
In this case ListModel is a handy way for us to test our UI. In practice
the model would be implemented in C++, or perhaps via a SQL data source.
+
+ Note that views do not enable \e clip automatically. If the view
+ is not clipped by another item or the screen, it will be necessary
+ to set \e {clip: true} in order to have the out of view items clipped
+ nicely.
*/
QDeclarativeListView::QDeclarativeListView(QDeclarativeItem *parent)
diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp
index f08e634..cd67aeb 100644
--- a/src/declarative/util/qdeclarativeview.cpp
+++ b/src/declarative/util/qdeclarativeview.cpp
@@ -194,6 +194,7 @@ void QDeclarativeViewPrivate::execute()
\o Initializes QGraphicsView for QML key handling:
\list
\o QGraphicsView::viewport()->setFocusPolicy(Qt::NoFocus);
+ \o QGraphicsView::setFocusPolicy(Qt::StrongFocus);
\o QGraphicsScene::setStickyFocus(true);
\endlist
\endlist
@@ -268,6 +269,7 @@ void QDeclarativeViewPrivate::init()
q->setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
scene.setItemIndexMethod(QGraphicsScene::NoIndex);
q->viewport()->setFocusPolicy(Qt::NoFocus);
+ q->setFocusPolicy(Qt::StrongFocus);
scene.setStickyFocus(true); //### needed for correct focus handling
}