summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-05-23 23:08:24 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-05-23 23:08:24 (GMT)
commit4b14fa2e56a0273069f474c3100339d85ab249a7 (patch)
tree9072be92d524875ea549e522f1ab75bdfe23300e /doc/src/snippets/code
parent4ef2862b791c210a30586ba140cc6f508e06883f (diff)
parentf81fcf9b50360d79aa186d5719d480d736ac576f (diff)
downloadQt-4b14fa2e56a0273069f474c3100339d85ab249a7.zip
Qt-4b14fa2e56a0273069f474c3100339d85ab249a7.tar.gz
Qt-4b14fa2e56a0273069f474c3100339d85ab249a7.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'doc/src/snippets/code')
-rw-r--r--doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp
index 4f27661..81099a7 100644
--- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp
+++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp
@@ -271,3 +271,9 @@ class QGraphicsPathItem : public QAbstractGraphicsShapeItem
};
//! [18]
+//! [19]
+QTransform xform = item->deviceTransform(view->viewportTransform());
+QRect deviceRect = xform.mapRect(rect).toAlignedRect();
+view->viewport()->scroll(dx, dy, deviceRect);
+//! [19]
+