summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmlview.cpp
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2009-10-02 02:21:12 (GMT)
committerBea Lam <bea.lam@nokia.com>2009-10-02 02:21:40 (GMT)
commitd535797f7fd5eebbc5d0128a477c57f71632a377 (patch)
tree4a126440ad3fb5b038bd9937a4ee66a2097a72c5 /src/declarative/util/qmlview.cpp
parent297dcaaef5741dac5e10c886db1755829e4ed082 (diff)
downloadQt-d535797f7fd5eebbc5d0128a477c57f71632a377.zip
Qt-d535797f7fd5eebbc5d0128a477c57f71632a377.tar.gz
Qt-d535797f7fd5eebbc5d0128a477c57f71632a377.tar.bz2
Make compile since QmlValuePropertySource is no longer a Qobject.
Diffstat (limited to 'src/declarative/util/qmlview.cpp')
-rw-r--r--src/declarative/util/qmlview.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/declarative/util/qmlview.cpp b/src/declarative/util/qmlview.cpp
index 98642e9..f932e4a 100644
--- a/src/declarative/util/qmlview.cpp
+++ b/src/declarative/util/qmlview.cpp
@@ -538,7 +538,11 @@ void QmlView::resizeEvent(QResizeEvent *e)
d->root->setWidth(width());
d->root->setHeight(height());
}
- setSceneRect(QRectF(0, 0, d->root->width(), d->root->height()));
+ if (d->root) {
+ setSceneRect(QRectF(0, 0, d->root->width(), d->root->height()));
+ } else {
+ setSceneRect(rect());
+ }
QGraphicsView::resizeEvent(e);
}