diff options
author | Martin Jones <martin.jones@nokia.com> | 2011-07-26 13:48:45 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-07-26 08:00:31 +0200 |
commit | e06211e4c67c0c7470fdac86c3fa6d50792516c5 (patch) | |
tree | fc672331a442d93f714c962efc47cbeb6b23dd3c /src/qtquick1/util | |
parent | e5be1482c81fb3a502e2e5f8e56f11f182c2adab (diff) |
qmlviewer resizes the root object multiple times.
In SizeRootObjectToView mode on initial load the view was set to
root object size, then the sceneResized() slot would resize back,
then we would finally reset back to the correct value in
statusChanged(true). Now react directly to the initial size being
set.
Change-Id: Ib6977cf7bad3fe79b9ac80bb6d916fb0f57c5f5e
Fixes: QTBUG-16499
Reviewed-on: http://codereview.qt.nokia.com/2148
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'src/qtquick1/util')
-rw-r--r-- | src/qtquick1/util/qdeclarativeview.cpp | 5 | ||||
-rw-r--r-- | src/qtquick1/util/qdeclarativeview.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/qtquick1/util/qdeclarativeview.cpp b/src/qtquick1/util/qdeclarativeview.cpp index ae7e07d0ce..cc19828c40 100644 --- a/src/qtquick1/util/qdeclarativeview.cpp +++ b/src/qtquick1/util/qdeclarativeview.cpp @@ -248,6 +248,10 @@ void QDeclarativeViewPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem, This signal is emitted when the component's current \a status changes. */ +/*! \fn void QDeclarativeView::initialSizeChanged(QSize size) + \internal +*/ + /*! \fn QDeclarativeView::QDeclarativeView(QWidget *parent) @@ -609,6 +613,7 @@ void QDeclarativeView::setRootObject(QObject *obj) resize(d->initialSize); } } + emit initialSizeChanged(d->initialSize); d->initResize(); } } diff --git a/src/qtquick1/util/qdeclarativeview.h b/src/qtquick1/util/qdeclarativeview.h index cfe1d458dc..39a2322f99 100644 --- a/src/qtquick1/util/qdeclarativeview.h +++ b/src/qtquick1/util/qdeclarativeview.h @@ -97,6 +97,7 @@ public Q_SLOTS: Q_SIGNALS: void sceneResized(QSize size); // ??? void statusChanged(QDeclarativeView::Status); + void initialSizeChanged(QSize size); private Q_SLOTS: void continueExecute(); |