qtlottieviewer の例
QtLottieAnimation をアプリケーションで使用する例です。
この例では、Qt.labs.lottieqt モジュールのLottieAnimation アイテムを使用して、Qt Quick アプリケーションで Lottie のアニメーションベクターグラフィックスファイルを直接表示し、制御する方法を示します。
概要
サンプルウィンドウのメインは、ロッティアニメーションを再生するLottieAnimation アイテムを含む長方形です。
その下には行のコントロールがあります。ユーザーは、フレームレートスライダーでアニメーションのスピードをコントロールし、スケールスライダーでズームインとズームアウトができます。再生/一時停止ボタンでアニメーションを停止したり、再開したりできます。一時停止中は、Goto Frameスライダーで表示するフレームを選択できます。開く]ボタンはファイルダイアログを表示し、ロードして表示するLottieファイルを選択できます。
LottieAnimation はQQuickPaintedItem 、ベクターグラフィックスをソフトウェアでラスタライズしています。QuickアプリケーションでLottieファイルを表示する別の方法として、グラフィックスのハードウェアレンダリングを利用する方法については、lottietoqmlと VectorImage の項目を参照してください。
© 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.