diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2021-03-10 17:21:07 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-03-27 08:01:09 +0000 |
commit | 032b12cd5074e4618f56668912465a4dca8d72f4 (patch) | |
tree | 4baff5960757f5432aaf84c85a04a26b3e7835df /src/quick/configure.cmake | |
parent | 0b930884f1a64b2531ef8cbf1a077ed2955bf4ae (diff) |
QQuickTableView: always update content size when rebuilding small tables
If you have a TableView with only a couple of rows, and you add
a third one, the contentHeight doesn't update. This is fine if
not all rows are loaded (some are outside the viewport), but when
they are all inside, it should update to reflect the exact height.
The same is also the case for the contentWidth. If you add a new
row that increases the with of a column (and all columns are
visible), the contentWidth should update.
This patch adds an extra check when we do a rebuild (which we do
when you add a new row), to see if all rows or columns are
loaded. And if that is the case, we update contentHeight or
contentWidth, respecitively.
Fixes: QTBUG-92099
Change-Id: I806bfb7c3606fca97c5d27cbb91856cc40df9fb8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit d6a5afd120838647e0dd2a420dacf06389f0a48e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/quick/configure.cmake')
0 files changed, 0 insertions, 0 deletions