@@ -77,9 +77,18 @@ class PopupAnchor: public QObject {
7777 // / determined by the @@edges, @@gravity, and @@adjustment.
7878 // /
7979 // / If you leave @@edges, @@gravity and @@adjustment at their default values,
80- // / setting more than `x` and `y` does not matter.
80+ // / setting more than `x` and `y` does not matter. The anchor rect cannot
81+ // / be smaller than 1x1 pixels.
8182 // /
82- // / > [!INFO] The anchor rect cannot be smaller than 1x1 pixels.
83+ // / > [!INFO] To position a popup relative to an item inside a window,
84+ // / > you can use [coordinate mapping functions] (note the warning below).
85+ // /
86+ // / > [!WARNING] Using [coordinate mapping functions] in a binding to
87+ // / > this property will position the anchor incorrectly.
88+ // / > If you want to use them, do so in @@anchoring(s), or use
89+ // / > @@TransformWatcher if you need real-time updates to mapped coordinates.
90+ // /
91+ // / [coordinate mapping functions]: https://doc.qt.io/qt-6/qml-qtquick-item.html#mapFromItem-method
8392 Q_PROPERTY (Box rect READ rect WRITE setRect NOTIFY rectChanged);
8493 // / The point on the anchor rectangle the popup should anchor to.
8594 // / Opposing edges suchs as `Edges.Left | Edges.Right` are not allowed.
@@ -127,6 +136,12 @@ class PopupAnchor: public QObject {
127136 void updatePlacement (const QPoint& anchorpoint, const QSize& size);
128137
129138signals:
139+ // / Emitted when this anchor is about to be used. Mostly useful for modifying
140+ // / the anchor @@rect using [coordinate mapping functions], which are not reactive.
141+ // /
142+ // / [coordinate mapping functions]: https://doc.qt.io/qt-6/qml-qtquick-item.html#mapFromItem-method
143+ void anchoring ();
144+
130145 void windowChanged ();
131146 QSDOC_HIDE void backingWindowVisibilityChanged ();
132147 void rectChanged ();
0 commit comments