このページでは

LottieVectorImageController QML Type

Lottieファイルを表示しているVectorImage のアニメーション制御を行います。詳細...

Import Statement: import Qt.labs.lottieqt 1.0
Since: Qt 6.12
Inherits:

QtObject

プロパティ

方法

詳細な説明

VectorImage Lottieアニメーションの表示と再生は可能ですが、それ自体では再生制御のための基本的な機能しか提供しません。LottieVectorImageControllerは、VectorImage を拡張し、アニメーションの照会や制御を行うためのより強力なAPIを提供します。

LottieVectorImageControllerのtarget プロパティは、制御対象となるVectorImage を指定します。 LottieVectorImageControllerがVectorImage の子またはプロパティとして作成された場合、このプロパティはデフォルトで設定されます。VectorImage がLottieファイルをロードし、そのstatus がReady となっている場合、LottieVectorImageControllerのプロパティの読み書きや関数の呼び出しが可能になり、再生を制御できます。

VectorImage と組み合わせることで、LottieVectorImageControllerは既存のLottieAnimation アイテムのAPIを模倣するため、通常はわずかな手間で互換性を持たせることができます。(getDuration() 関数は提供されていません。これは、endFrame 、startFrame 、およびオプションでframeRate プロパティを使用した単純な式で容易に置き換えられるためです。)

VectorImage およびqtlottieviewerの例も参照してください 。

プロパティのドキュメント

currentFrame : real [read-only]

現在表示されているアニメーションのフレーム番号。

endFrame : real [read-only]

ソースファイルで指定されている、アニメーションの終了フレーム番号(「アウトフレーム」)。

frameRate : real

このプロパティには、アニメーションの再生速度(1秒あたりのフレーム数)が格納されます。

ベクター画像が読み込まれると、このプロパティはソースファイルで指定されたフレームレート値に設定されます。

読み込み後、frameRate を変更することで再生速度を変更できます。このプロパティに空の値を割り当てると、ソースファイルの値にリセットされます。

startFrame : real [read-only]

ソースファイルで指定されている、アニメーションの開始フレーム番号(「in-frame」)。

target : VectorImage

このプロパティは、制御対象となるVectorImage を指定します。

LottieVectorImageController がVectorImage の子またはプロパティとして作成されている場合、それがデフォルトのターゲットとなります。それ以外の場合は、ターゲットを明示的に設定する必要があります。

メソッドのドキュメント

void gotoAndPlay(real frame)

再生位置をLottieのフレーム番号frame に移動し、再生します。

frame startFrame と の範囲内にクリップされます。endFrame

void gotoAndStop(real frame)

再生をLottieのフレーム番号frame に移動し、一時停止します。

frame startFrame と の範囲内にクリップされます。endFrame

void pause()

再生を一時停止します。

void play()

再生を開始(一時停止を解除)します。

void start()

startFrame から再生を再開します。

void stop()

再生を「startFrame 」の状態にリセットし、一時停止します。

void togglePause()

target (VectorImage )の再生モードと一時停止モードを切り替えます。

© 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.