![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\qmltype AnchorChanges
\nativetype QQuickAnchorChanges
\inqmlmodule QtQuick
\ingroup qtquick-states
\brief Specifies how to change the anchors of an item in a state.
The AnchorChanges type is used to modify the anchors of an item in a \l State.
AnchorChanges cannot be used to modify the margins on an item. For this, use
PropertyChanges instead.
In the following example we change the top and bottom anchors of an item
using AnchorChanges, and the top and bottom anchor margins using
PropertyChanges:
\snippet qml/anchorchanges.qml 0
\image anchorchanges.png {Red square changing anchor position
between two states}
AnchorChanges can be animated using AnchorAnimation.
\qml
animate our anchor changes Transition { AnchorAnimation {} } \endqml
Changes to anchor margins can be animated using NumberAnimation.
For more information on anchors see \l {anchor-layout}{Anchor Layouts}.
Definition at line 565 of file qquickstateoperations.cpp.
| QQmlScriptString QQuickAnchorSetPrivate::baselineScript |
Definition at line 578 of file qquickstateoperations.cpp.
| QQmlScriptString QQuickAnchorSetPrivate::bottomScript |
Definition at line 575 of file qquickstateoperations.cpp.
| QQmlScriptString QQuickAnchorSetPrivate::hCenterScript |
Definition at line 576 of file qquickstateoperations.cpp.
| QQmlScriptString QQuickAnchorSetPrivate::leftScript |
Definition at line 572 of file qquickstateoperations.cpp.
| QQuickAnchors::Anchors QQuickAnchorSetPrivate::resetAnchors |
Definition at line 570 of file qquickstateoperations.cpp.
| QQmlScriptString QQuickAnchorSetPrivate::rightScript |
Definition at line 573 of file qquickstateoperations.cpp.
| QQmlScriptString QQuickAnchorSetPrivate::topScript |
Definition at line 574 of file qquickstateoperations.cpp.
| QQuickAnchors::Anchors QQuickAnchorSetPrivate::usedAnchors |
Definition at line 569 of file qquickstateoperations.cpp.
| QQmlScriptString QQuickAnchorSetPrivate::vCenterScript |
Definition at line 577 of file qquickstateoperations.cpp.