From 8ed9f545b9339872f93b8adf5e6bd1820b561fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 21 Dec 2023 16:00:43 +0100 Subject: [PATCH] Clarify QQuickItem::map{To,From}Item when passed a nullptr Passing nullptr when mapping to/from an item results in mapping relative to the scene's coordinate system, and this is also what the "Scene Coordinates" section of "Concepts - Visual Coordinates in Qt Quick" documents. Avoid the ambiguous term "root QML view", which may be mistaken for the top level window in a child-window scenario. Pick-to: 6.5 Change-Id: Ibd386ec8248f5e398b04248d15c7cf48bd46c090 Reviewed-by: Richard Moe Gustavsen (cherry picked from commit 2ea08a9918343002a5ddf20f3c48c577fb27544c) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit b0cc7939b88d855f803d48a4c41c5bf5e51d3e8b) --- src/quick/items/qquickitem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 48a9b7f5ea..c299ec5140 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -4653,7 +4653,7 @@ static bool unwrapMapFromToFromItemArgs(QQmlV4Function *args, const QQuickItem * \input item.qdocinc mapping If \a item is a \c null value, this maps the point or rect from the coordinate system of - the root QML view. + the \l{Scene Coordinates}{scene}. The versions accepting point and rect are since Qt 5.15. */ @@ -4711,7 +4711,7 @@ QTransform QQuickItem::itemTransform(QQuickItem *other, bool *ok) const \input item.qdocinc mapping If \a item is a \c null value, this maps the point or rect to the coordinate system of the - root QML view. + \l{Scene Coordinates}{scene}. The versions accepting point and rect are since Qt 5.15. */