aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/items/qsgview.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/declarative/items/qsgview.cpp b/src/declarative/items/qsgview.cpp
index 1d1118950a..416b803814 100644
--- a/src/declarative/items/qsgview.cpp
+++ b/src/declarative/items/qsgview.cpp
@@ -351,7 +351,8 @@ void QSGViewPrivate::setRootObject(QObject *obj)
if (root) {
initialSize = rootObjectSize();
- if (initialSize != q->size()) {
+ if ((resizeMode == QSGView::SizeViewToRootObject || !q->testAttribute(Qt::WA_Resized))
+ && initialSize != q->size()) {
if (!(q->parentWidget() && q->parentWidget()->layout())) {
q->resize(initialSize);
}