aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2020-11-06 13:30:12 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-12-09 13:51:26 +0000
commit1241e4f3c3ec010ae121f5d56c3e9405ec43231f (patch)
treebfd3f87043c2e9b7c03ff305969b23f18bbbe55a /src/quick/items
parent83100a84f2b0068b4cf725896bbb810415908334 (diff)
Show a tableview even if the syncView has an empty model
By showing the tableview, we can be sure that headerviews will be visible even in the syncView has an empty model. Fixes: QTBUG-87526 Change-Id: I68c8b119122a2d2f88c2afbeb2d6c71a83a3ce33 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 27c254203b3e7dd6d3a4445feb205fbe98c32d30) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/quick/items')
-rw-r--r--src/quick/items/qquicktableview.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/quick/items/qquicktableview.cpp b/src/quick/items/qquicktableview.cpp
index 7b73fcb393..1349d308d7 100644
--- a/src/quick/items/qquicktableview.cpp
+++ b/src/quick/items/qquicktableview.cpp
@@ -1760,11 +1760,8 @@ void QQuickTableViewPrivate::calculateTopLeft(QPoint &topLeftCell, QPointF &topL
const auto syncView_d = syncView->d_func();
if (syncView_d->loadedItems.isEmpty()) {
- // The sync view contains no loaded items. This probably means
- // that it has not been rebuilt yet. Which also means that
- // we cannot rebuild anything before this happens.
- topLeftCell.rx() = kEdgeIndexNotSet;
- topLeftCell.ry() = kEdgeIndexNotSet;
+ topLeftCell.rx() = 0;
+ topLeftCell.ry() = 0;
return;
}