SequentialAnimation QML Type
애니메이션을 순차적으로 실행할 수 있습니다. 더 보기...
| Import Statement: | import QtQuick |
| Inherits: |
상세 설명
SequentialAnimation 및 ParallelAnimation 유형을 사용하면 여러 애니메이션을 함께 실행할 수 있습니다. SequentialAnimation에 정의된 애니메이션은 차례대로 실행되는 반면, ParallelAnimation 에 정의된 애니메이션은 동시에 실행됩니다.
다음 예제는 두 개의 숫자 애니메이션을 순차적으로 실행합니다. ` Rectangle `은 ` x `의 위치 50까지 애니메이션을 실행한 다음, ` y `의 위치 50까지 애니메이션을 실행합니다.
import QtQuick
Rectangle {
id: rect
width: 100; height: 100
color: "red"
SequentialAnimation {
running: true
NumberAnimation { target: rect; property: "x"; to: 50; duration: 1000 }
NumberAnimation { target: rect; property: "y"; to: 50; duration: 1000 }
}
}Transition 내에서 정의된 애니메이션은 자동으로 병렬로 실행되므로, 원하는 동작이 병렬 실행인 경우 SequentialAnimation을 사용하여 Transition 에 포함된 애니메이션을 감싸도록 할 수 있습니다.
다른 애니메이션 유형과 마찬가지로, SequentialAnimation은 전환, 동작 및 속성 값 소스를 포함하여 다양한 방식으로 적용될 수 있습니다. ‘ Qt Quick 의 애니메이션 및 전환’ 문서에는 애니메이션을 생성하는 다양한 방법이 소개되어 있습니다.
참고: 애니메이션이 SequentialAnimation 또는 ParallelAnimation 로그룹화되면 개별적으로 시작하거나 중지할 수 없으며, SequentialAnimation 또는 ParallelAnimation 를 그룹 단위로 시작하고 중지해야 합니다.
관련 항목: ParallelAnimation, Qt Quick 의 ‘애니메이션 및 전환(Animation and Transitions)’, Qt Quick 예제 - 애니메이션.
© 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.