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>
상세 설명
앵커 애니메이션은 앵커 변경에 애니메이션을 적용하는 데 사용됩니다.
다음 스니펫에서는 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 에서 앵커 애니메이션을 사용하면 상태 변경 중에 발생한 모든 AnchorChanges 에 애니메이션을 적용합니다. AnchorChanges.target 속성을 사용하여 특정 대상 항목을 설정하면 이를 재정의할 수 있습니다.
참고: 앵커 애니메이션은 Transition 에서만 앵커 변경과 함께 사용할 수 있습니다. 동작 및 다른 유형의 애니메이션에는 사용할 수 없습니다.
Qt Quick 및 AnchorChanges에서 애니메이션 및 전환을참조하세요 .
속성 문서
duration : int |
이 속성은 애니메이션의 지속 시간(밀리초)을 보유합니다.
기본값은 250입니다.
easing group |
---|
easing.amplitude : real |
easing.overshoot : real |
easing.period : real |
easing.type : enumeration |
애니메이션에 사용되는 완화 커브를 지정합니다.
완화 커브를 지정하려면 최소한 유형을 지정해야 합니다. 일부 커브의 경우 진폭, 주기 및/또는 오버슈트를 지정할 수도 있습니다. 기본 완화 커브는 선형입니다.
AnchorAnimation { easing.type: Easing.InOutQuad }
다양한 유형의 완화 커브에 대한 자세한 내용은 PropertyAnimation::easing.type 문서를 참조하세요.
리앵커할 항목.
대상을 지정하지 않으면 모든 AnchorChanges 이 AnchorAnimation 에 의해 애니메이션됩니다.
© 2025 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.