qtlottieviewer 예제
Qt Quick 를 사용하여 Lottie 애니메이션을 표시하고 제어하는 방법을 보여줍니다.

이 예제는 Qt.labs.lottieqt 모듈을 사용하여 Qt Quick 애플리케이션에서 Lottie 애니메이션 벡터 그래픽 파일을 직접 표시하고 제어하는 방법을 보여줍니다.
다음과 같은 두 가지 접근 방식을 보여줍니다:
- VectorImage 사용 LottieVectorImageController
- 다음과 같이 사용하는 방법: LottieAnimation
개요
예제 창의 상단에는 VectorImage 과 LottieAnimation 플레이어 간을 전환할 수 있는 탭 바가 있습니다. 창의 주요 부분은 선택된 Lottie 파일 플레이어를 포함하는 사각형으로, Lottie 애니메이션을 표시합니다.
그 아래에는 일련의 컨트롤이 있습니다. 사용자는 프레임 속도(Frame Rate) 슬라이더로 애니메이션 속도를 조절하고, 배율(Scale) 슬라이더를 사용하여 확대 및 축소할 수 있습니다. 재생/일시정지(Play/Pause) 버튼을 사용하여 애니메이션을 중지하거나 다시 시작할 수 있습니다. 일시 정지 상태에서는 ‘프레임 이동(Goto Frame)’ 슬라이더를 사용하여 표시할 정확한 프레임을 선택할 수 있습니다. '열기' 버튼을 클릭하면 파일 선택 대화 상자가 나타나며, 사용자는 여기서 불러와 표시할 Lottie 파일을 선택할 수 있습니다.
LottieAnimation 이는 벡터 그래픽의 소프트웨어 래스터화를 사용하는 QQuickPaintedItem 입니다. VectorImage 는 벡터 그래픽 파일을 하드웨어 GPU 렌더링을 활용하는 Qt Quick Shapes 모듈을 활용하며, 이 모듈은 하드웨어 GPU 렌더링을 사용합니다. xml-ph-0001@deepl.internal
lottietoqml도 참조하십시오 .
© 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.