diff options
author | Andy Shaw <andy.shaw@qt.io> | 2020-11-06 13:30:12 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-12-09 12:14:26 +0000 |
commit | 6d852a7e65d56519f1d73cd853430946f5526f8e (patch) | |
tree | 7fa6a769eb961a9502a5a048b81f0da9e4c512b4 /src | |
parent | 51ffb54f8d710b830668be53573ef9dfcb9d8d93 (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')
-rw-r--r-- | src/quick/items/qquicktableview.cpp | 7 |
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; } |