diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2022-02-09 20:06:39 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-02-15 08:03:18 +0000 |
commit | 194ab1588cdbaa1b8d1ca05294c5b1586b8c4dcf (patch) | |
tree | 66f592606cf6b0ec1eb8911a0c69aad4877ee31c /examples/quick | |
parent | 2551d3f934b41b4b5e8f03c4db6a107e064c138a (diff) |
QQuickTableView: don't position the table contents outside the viewport
If you call positionViewAtCell(row, Qt.AlignTop) for the last row
in the table, the row will be aligned to the top of the view, as
requested. But this looks really wrong , since it will cause the
table to be flicked to a position that causes it to overshoot
by a distance close to the height of the whole view, effectively
leaving a big empty gap at the bottom. This looks really buggy.
This patch will correct this behavior by ensuring that we never
flick the table to an "invalid" position while positioning
table at a cell using the requested alignment. Instead we
clamp the table to the edges of the viewport.
Fixes: QTBUG-100680
Change-Id: Id3003df784a0128df28ee2e78e2456e1fa1e11e8
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit c3d909ec286962c507e346a8d490b905cdd266f8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/quick')
0 files changed, 0 insertions, 0 deletions