이 페이지에서

ParallelAnimation QML Type

애니메이션을 병렬로 실행할 수 있게 합니다. 더 보기...

Import Statement: import QtQuick
Inherits:

Animation

상세 설명

SequentialAnimation 및 ParallelAnimation 유형을 사용하면 여러 애니메이션을 함께 실행할 수 있습니다. SequentialAnimation 에 정의된 애니메이션은 차례대로 실행되는 반면, ParallelAnimation에 정의된 애니메이션은 동시에 실행됩니다.

다음 애니메이션은 두 개의 숫자 애니메이션을 병렬로 실행합니다. Rectangle 는 x 및 y 속성을 동시에 애니메이션화하여 (50,50) 위치로 이동합니다.

import QtQuick

Rectangle {
    id: rect
    width: 100; height: 100
    color: "red"

    ParallelAnimation {
        running: true
        NumberAnimation { target: rect; property: "x"; to: 50; duration: 1000 }
        NumberAnimation { target: rect; property: "y"; to: 50; duration: 1000 }
    }
}

다른 애니메이션 유형과 마찬가지로, ParallelAnimation은 전환, 동작 및 속성 값 소스를 포함하여 다양한 방식으로 적용될 수 있습니다. ‘ Qt Quick 의 애니메이션 및 전환’ 문서에서는 애니메이션을 생성하는 다양한 방법을 보여줍니다.

참고: 애니메이션이 SequentialAnimation 또는 ParallelAnimation으로그룹화되면 개별적으로 시작하거나 중지할 수 없으며, SequentialAnimation 또는 ParallelAnimation을 그룹 단위로 시작 및 중지해야 합니다.

또한 SequentialAnimation, Qt Quick 의 ‘애니메이션 및 전환’ 섹션, 그리고 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.