aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2020-11-06 13:30:12 +0100
committerAndy Shaw <andy.shaw@qt.io>2020-12-09 11:42:56 +0100
commit27c254203b3e7dd6d3a4445feb205fbe98c32d30 (patch)
tree2830b29326555d9b50fb794e647f3325d2fd45b8 /src/quick/items
parenta586e2d141f68dfa0295f9e28f564e53af1d5641 (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 Pick-to: 5.15 6.0 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
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 571ac90008..1b71bd5a53 100644
--- a/src/quick/items/qquicktableview.cpp
+++ b/src/quick/items/qquicktableview.cpp
@@ -1955,11 +1955,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;
}