summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/qgraphicslistview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qgraphicslistview.cpp b/src/qgraphicslistview.cpp
index a2f1546..0de92b7 100644
--- a/src/qgraphicslistview.cpp
+++ b/src/qgraphicslistview.cpp
@@ -895,7 +895,7 @@ qreal QtGraphicsListView::maximumOffset() const
content += size.height();
max = qMax(max, size.height());
}
- return content - size().height();
+ return qMax<qreal>(content - size().height(), 0);
} else { // Horizontal
for (int index = 0; index < count; ++index) {
initStyleOption(&option, index);
@@ -903,7 +903,7 @@ qreal QtGraphicsListView::maximumOffset() const
content += size.width();
max = qMax(max, size.width());
}
- return content - size().width();
+ return qMax<qreal>(content - size().width(), 0);
}
}