aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/doc/snippets/qml/item
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2024-08-13 12:31:41 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-08-20 16:20:12 +0000
commitba7953d85083495891834b441abecb20324cdd29 (patch)
tree17e6269eb9e147a0b623cddfa226802e2ff4ca71 /src/quick/doc/snippets/qml/item
parentdbf9356119f83278ab02a7dd711cb135fc282b5f (diff)
QQuickTableView: detect if sync view and sync child is out of sync
When syncView is requested to do a relayout, it will tell the sync children to do relayout as well. A relayout alone will not change the top-left delegate item in the viewport, only layout the existing delegate items. But as it turns out, it can happen that the relayout leaves empty space in the viewport that needs to be refilled with new rows and columns. This is typically the case if some of the columns were resized smaller than what they used to be. And this can change which cell ends up as top-left, or move it to a different position. We therefore need to extend the check in syncSyncView to also include the _position_ of the top-left cell, and not only if the top-left cell itself has changed. As it stood, we also did a viewportOnly rebuild every time a new row or column was flicked into the viewport. This is very unnecessary, and slows down performance. Instead, we only need to do this when if the sync child is told to do (at least) a LayoutOnly. Only then can any of the visible rows or columns have been resized. Fixes: QTBUG-127809 Change-Id: I815a47e9d6453871172ff7136f8cfbd51a5bc789 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> (cherry picked from commit 25348bc0e67f019232aa70c5558988a0c17bd15e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit a5d0cfe092cc8411469ef53df13f2dac12051bf4) (cherry picked from commit 6f699d343c3dab086acf927c8601c88580317365) (cherry picked from commit dd507a05b3d0743627f8503785000a5e75f9cbcb)
Diffstat (limited to 'src/quick/doc/snippets/qml/item')
0 files changed, 0 insertions, 0 deletions