aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Redondo <kde@david-redondo.de>2020-05-13 11:04:23 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-11-23 11:18:19 +0000
commitd71913f378228a10bea44e771021adb84b6e7e66 (patch)
tree5e062f80dd4566fde623544108ddc40817997eb5 /src
parentf284ba291766ae3aa6d52dc7402c74b6a1674ab4 (diff)
QQuickItemView: Fix max(X/Y)Extent()
QQuickFlickable maxXExtent() and maxYExtent() return the amount of space that is not shown when inside a ScrollView. QQuickItemView however just returned width() if vertical and height() if horizontal. In these cases just defer to the QQuickFlickable base implementation like minXExtent() and minYExtent() already do. Fixes: QTBUG-83890 Change-Id: I7f4060c2f46ae07611bedceca0d322c5f7f6affb Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 99047ae219ff6689da38cc988a25030fece655da) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/quick/items/qquickitemview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/items/qquickitemview.cpp b/src/quick/items/qquickitemview.cpp
index 5af99507fd..4b3b90b805 100644
--- a/src/quick/items/qquickitemview.cpp
+++ b/src/quick/items/qquickitemview.cpp
@@ -1353,7 +1353,7 @@ qreal QQuickItemView::maxYExtent() const
{
Q_D(const QQuickItemView);
if (d->layoutOrientation() == Qt::Horizontal)
- return height();
+ return QQuickFlickable::maxYExtent();
if (d->vData.maxExtentDirty) {
d->maxExtent = d->maxExtentForAxis(d->vData, false);
@@ -1381,7 +1381,7 @@ qreal QQuickItemView::maxXExtent() const
{
Q_D(const QQuickItemView);
if (d->layoutOrientation() == Qt::Vertical)
- return width();
+ return QQuickFlickable::maxXExtent();
if (d->hData.maxExtentDirty) {
d->maxExtent = d->maxExtentForAxis(d->hData, true);