ScaleAnimator QML Type
ScaleAnimatorタイプは、Itemのスケールファクターをアニメーション化します。詳細...
| Import Statement: | import QtQuick |
| Inherits: |
詳細説明
Animator タイプは通常の Animation タイプとは異なります。Animatorを使用する場合、アニメーションはレンダースレッドで実行することができ、アニメーションが完了するとプロパティ値は最後にジャンプします。
アニメーションが終了すると、Item::scale の値が更新されます。
次のスニペットは、ScaleAnimator を Rectangle アイテムと一緒に使用する方法を示しています。
Rectangle { id: scalingBox width: 50 height: 50 color: "lightsteelblue" ScaleAnimator { target: scalingBox; from: 0.5; to: 1; duration: 1000 running: true } }
また、on キーワードを使用して、ScaleAnimator を Item インスタンスに直接結びつけることも可能です。
Rectangle { width: 50 height: 50 color: "lightsteelblue" ScaleAnimator on scale { from: 0.5; to: 1; duration: 1000 } }
注: 非スレッドのレンダリングループを使用する場合、Animator タイプには何のメリットもありません。
注: メイン(GUI)スレッドで高価なブロッキング処理を行いながらアニメーション・コンテンツを表示するためにアニメーターに依存するのではなく、マルチスレッド、非同期の原則に基づいた設計をアプリケーションで検討することをお勧めします。QMLではWorkerScript 、asynchronous image loading 、C++ではワーカースレッド、並列アルゴリズムなどを使用します、 Qt ConcurrentC++では、ワーカースレッド、並列アルゴリズム、コルーチンを使用します。
Item::transformOrigin およびRotationAnimatorも参照して ください。
© 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.