aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicklayouts/qquickstacklayout.cpp
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2022-03-23 11:09:02 +0100
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2022-04-08 15:20:32 +0200
commit7e24db7464a9b9bda0ab1424cf339475a55e4663 (patch)
tree04c6236913fbaa775639832afb06fbd534724eb6 /src/quicklayouts/qquickstacklayout.cpp
parent2fb43a35dfa08bb0746913e3363f1fcf21815e72 (diff)
QQuickTableView: add new function: cellAtPosition()
The current "cellAtPos(pos)" function expects pos to be relative to TableView. The problem is that if you attach a Pointer Handler to TableView, it will actually install itself on the contentItem, and the positions it reports will be relative to the contentItem. Since the position used in a call to cellAtPos() is almost always coming from a Pointer Handler attached to TableView, it makes more sense to replace the cellAtPos() with a version that expects pos to be relative to the contentItem instead. This will remove a source of confusion and discrepancy, and also avoid the need to convert the pos to and from the contentItem all the time (also in QQuickTableView's own code). This patch will therefore add a new function "cellAtPosition()", and at the same time, deprecate the old "cellAtPos()". [ChangeLog][QtQuick][TableView] cellAtPos(pos) is now deprecated in favor of cellAtPosition(pos). The latter will assume pos to be relative to the contentItem. Change-Id: Iaf2f3ae81592bec4370e620c990045fdec6213b8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicklayouts/qquickstacklayout.cpp')
0 files changed, 0 insertions, 0 deletions