RotationAnimator QML Type
RotationAnimator タイプは、Item の回転をアニメーション化します。詳細...
Import Statement: | import QtQuick |
Inherits: |
プロパティ
- direction : enumeration
詳細説明
Animator タイプは通常のAnimationタイプとは異なります。Animatorを使用する場合、アニメーションはレンダースレッドで実行することができ、アニメーションが完了するとプロパティ値は最後にジャンプします。
アニメーションが終了すると、Item::rotation の値が更新されます。
次のスニペットは、RotationAnimator を Rectangle アイテムと一緒に使用する方法を示しています。
Rectangle { id: rotatingBox width: 50 height: 50 color: "lightsteelblue" RotationAnimator { target: rotatingBox; from: 0; to: 360; duration: 1000 running: true } }
また、on
キーワードを使用して、Item インスタンスのrotation
プロパティに RotationAnimator を直接結びつけることも可能です。
Rectangle { width: 50 height: 50 color: "lightsteelblue" RotationAnimator on rotation { from: 0; to: 360; duration: 1000 } }
Item::transformOrigin およびScaleAnimatorも参照してください 。
プロパティの説明
direction : enumeration |
このプロパティは、回転の方向を保持します。
指定できる値は次のとおりです:
定数 | 説明 |
---|---|
RotationAnimator.Numerical | (デフォルト) 2つの数値の間を線形補間して回転する。10から350までの回転は、時計回りに340度回転する。 |
RotationAnimator.Clockwise | 2つの値の間を時計回りに回転 |
RotationAnimator.Counterclockwise | 2つの値の間を反時計回りに回転 |
RotationAnimator.Shortest | 最も短いアニメーションパスを生成する方向に回転します。10から350までの回転は、反時計回りに20度回転します。 |
© 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.