aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/quicktemplates/qquickpane.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/quicktemplates/qquickpane.cpp b/src/quicktemplates/qquickpane.cpp
index 603b213810..bd89c63cf6 100644
--- a/src/quicktemplates/qquickpane.cpp
+++ b/src/quicktemplates/qquickpane.cpp
@@ -176,6 +176,9 @@ qreal QQuickPanePrivate::getContentWidth() const
if (!contentItem)
return 0;
+ if (hasContentWidth)
+ return contentWidth;
+
const qreal cw = contentItem->implicitWidth();
if (!qFuzzyIsNull(cw))
return cw;
@@ -202,6 +205,9 @@ qreal QQuickPanePrivate::getContentHeight() const
if (!contentItem)
return 0;
+ if (hasContentHeight)
+ return contentHeight;
+
const qreal ch = contentItem->implicitHeight();
if (!qFuzzyIsNull(ch))
return ch;
@@ -305,8 +311,8 @@ void QQuickPane::resetContentWidth()
if (!d->hasContentWidth)
return;
- d->hasContentHeight = false;
- d->updateContentWidth();
+ d->hasContentWidth = false;
+ d->updateImplicitContentWidth();
}
/*!
@@ -345,7 +351,7 @@ void QQuickPane::resetContentHeight()
return;
d->hasContentHeight = false;
- d->updateContentHeight();
+ d->updateImplicitContentHeight();
}
/*!
@@ -421,6 +427,12 @@ void QQuickPane::contentSizeChange(const QSizeF &newSize, const QSizeF &oldSize)
{
Q_UNUSED(newSize);
Q_UNUSED(oldSize);
+
+ Q_D(QQuickPane);
+ if (d->hasContentWidth)
+ d->updateImplicitContentWidth();
+ if (d->hasContentHeight)
+ d->updateImplicitContentHeight();
}
#if QT_CONFIG(accessibility)