don't create the anchor for getters
This commit is contained in:
parent
5d9bf64a7b
commit
aae2ebad96
@ -175,7 +175,7 @@ void QskItemAnchors::setCenterOffset( Qt::Orientation orientation, qreal offset
|
||||
|
||||
qreal QskItemAnchors::centerOffset( Qt::Orientation orientation )
|
||||
{
|
||||
if ( const auto anchors = qskGetOrCreateAnchors( m_attachedItem ) )
|
||||
if ( const auto anchors = qskGetAnchors( m_attachedItem ) )
|
||||
{
|
||||
if ( orientation == Qt::Horizontal )
|
||||
return anchors->horizontalCenterOffset();
|
||||
|
@ -18,7 +18,7 @@ class QQuickItem;
|
||||
that has been designed to be used from QML.
|
||||
|
||||
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
|
||||
anchor chains.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user