AnchorAnimation QML Type
앵커 값의 변화를 애니메이션으로 표현합니다. 더 보기...
| Import Statement: | import QtQuick |
| Inherits: |
속성
- duration : int
- easing
- easing.amplitude : real
- easing.overshoot : real
- easing.period : real
- easing.type : enumeration
- targets : list<Item>
상세 설명
AnchorAnimation은 앵커 변경을 애니메이션 처리하는 데 사용됩니다.
다음 코드 예제에서는 ` Rectangle`에 오른쪽 앵커를 추가하는 과정을 애니메이션으로 표현합니다:
import QtQuick
Item {
id: container
width: 200; height: 200
Rectangle {
id: myRect
width: 100; height: 100
color: "red"
}
states: State {
name: "reanchored"
AnchorChanges { target: myRect; anchors.right: container.right }
}
transitions: Transition {
// smoothly reanchor myRect and move into new position
AnchorAnimation { duration: 1000 }
}
Component.onCompleted: container.state = "reanchored"
}Transition 에서 AnchorAnimation을 사용하면, 상태 변경 중에 발생한 모든 AnchorChanges 에 대해 애니메이션이 적용됩니다. 이는 AnchorChanges.target 속성을 사용하여 특정 대상 항목을 설정함으로써 재정의할 수 있습니다.
참고: AnchorAnimation은 Transition 내에서만, 그리고 AnchorChange와 함께 사용해야 합니다. 비헤이비어(behaviors)나 다른 유형의 애니메이션에서는 사용할 수 없습니다.
Qt Quick 의 애니메이션 및 전환 (Animation and Transitions in )과 AnchorChanges도 참조하십시오 .
속성 설명서
duration : int
이 속성은 애니메이션의 지속 시간을 밀리초 단위로 저장합니다.
기본값은 250입니다.
easing group
애니메이션에 사용되는 이징 곡선을 지정합니다.
이징 곡선을 지정하려면 최소한 유형을 지정해야 합니다. 일부 곡선의 경우 진폭, 주기 및/또는 오버슈트도 지정할 수 있습니다. 기본 이징 곡선은 선형(Linear)입니다.
AnchorAnimation { easing.type: Easing.InOutQuad }다양한 이징 곡선 유형에 대한 자세한 내용은 PropertyAnimation::easing.type 문서를 참조하십시오.
targets : list<Item> [read-only]
재고정할 항목들.
대상이 지정되지 않은 경우, 모든 AnchorChanges 는 AnchorAnimation 에 의해 애니메이션이 적용됩니다.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.