From 30ad1d54ba394d54bf7996fac5a11af1d75809cb Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Wed, 30 Sep 2009 15:07:29 +0200 Subject: Set sceneRect to size of root item instead of size of view. This changes nothing when contentResizable is set and allows scroll bars to be used when it's false and the view size is smaller than the root item's size. Reviewed-by: owolff --- src/declarative/util/qmlview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/util/qmlview.cpp b/src/declarative/util/qmlview.cpp index 805612e..98642e9 100644 --- a/src/declarative/util/qmlview.cpp +++ b/src/declarative/util/qmlview.cpp @@ -538,7 +538,7 @@ void QmlView::resizeEvent(QResizeEvent *e) d->root->setWidth(width()); d->root->setHeight(height()); } - setSceneRect(rect()); + setSceneRect(QRectF(0, 0, d->root->width(), d->root->height())); QGraphicsView::resizeEvent(e); } -- cgit v0.12