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 のAnimation and Transitionsのドキュメントでは、アニメーションを作成するための様々な方法を紹介しています。
ParallelAnimation 注: アニメーションがSequentialAnimationやParallelAnimation にグループ化されると、個別に開始したり停止したりすることはできません。
ParallelAnimation 、 Qt Quick のアニメーションとトランジション、Qt Quick Examples - Animationも参照 。
© 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.