SequentialAnimation QML Type
アニメーションを順番に実行できるようにします。詳細...
| Import Statement: | import QtQuick |
| Inherits: |
詳細な説明
SequentialAnimation およびParallelAnimation 型を使用すると、複数のアニメーションを組み合わせて実行できます。SequentialAnimation で定義されたアニメーションは順番に実行され、ParallelAnimation で定義されたアニメーションは同時に実行されます。
次の例では、2つの数値アニメーションを順次実行します。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 」の「アニメーションとトランジション」、および「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.