don't create the anchor for getters

This commit is contained in:
Uwe Rathmann 2024-10-13 12:33:44 +02:00
parent 5d9bf64a7b
commit aae2ebad96
2 changed files with 2 additions and 2 deletions

View File

@ -175,7 +175,7 @@ void QskItemAnchors::setCenterOffset( Qt::Orientation orientation, qreal offset
qreal QskItemAnchors::centerOffset( Qt::Orientation orientation ) qreal QskItemAnchors::centerOffset( Qt::Orientation orientation )
{ {
if ( const auto anchors = qskGetOrCreateAnchors( m_attachedItem ) ) if ( const auto anchors = qskGetAnchors( m_attachedItem ) )
{ {
if ( orientation == Qt::Horizontal ) if ( orientation == Qt::Horizontal )
return anchors->horizontalCenterOffset(); return anchors->horizontalCenterOffset();

View File

@ -18,7 +18,7 @@ class QQuickItem;
that has been designed to be used from QML. that has been designed to be used from QML.
Qt/Quick anchoring is a simple concept, that allows to attach Qt/Quick anchoring is a simple concept, that allows to attach
borders ( Qt::AnchorPoint ) of attachedItem to a borders of borders ( Qt::AnchorPoint ) of attachedItem to a border of
other items. It is up to the user to avoid cycles or conflicting other items. It is up to the user to avoid cycles or conflicting
anchor chains. anchor chains.