LottieVectorImageController QML Type
Lottie 파일을 표시하는 VectorImage 에 대한 애니메이션 제어 기능을 제공합니다. 더 보기...
| Import Statement: | import Qt.labs.lottieqt 1.0 |
| Since: | Qt 6.12 |
| Inherits: |
속성
- currentFrame : real
- endFrame : real
- frameRate : real
- startFrame : real
- target : VectorImage
방법
- void gotoAndPlay(real frame)
- void gotoAndStop(real frame)
- void pause()
- void play()
- void start()
- void stop()
- void togglePause()
상세 설명
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
이 속성은 애니메이션 재생 속도를 초당 프레임 수(fps) 단위로 저장합니다.
벡터 이미지가 로드되면 이 속성은 소스 파일에 지정된 프레임 속도 값으로 설정됩니다.
로딩이 완료된 후에는 frameRate를 수정하여 재생 속도를 변경할 수 있습니다. 이 속성에 빈 값을 할당하면 소스 파일의 값으로 재설정됩니다.
startFrame : real [read-only]
소스 파일에 지정된 애니메이션의 시작 프레임 번호(“인-프레임”).
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.