Name Description Size Coverage
CMakeLists.txt 253 -
doc -
qlottieanimation.cpp ! \qmltype LottieAnimation \inqmlmodule Qt.labs.lottieqt \since 5.13 \brief A Lottie player for Qt. The LottieAnimation type shows Lottie format files. LottieAnimation is used to load and render Lottie files exported from Adobe After Effects. Currently, only subset of the full Lottie specification is supported. Most notable deviations are: \list \li Only Shape layer supported \li Only integer frame-mode of a timeline supported (real frame numbers and time are rounded to the nearest integer) \li Expressions are not supported \endlist For the full list of devations, please see see the \l{Limitations} section. \section1 Example Usage The following example shows a simple usage of the LottieAnimation type \qml LottieAnimation { loops: 2 quality: LottieAnimation.MediumQuality source: "animation.json" autoPlay: false onStatusChanged: { if (status === LottieAnimation.Ready) { // any acvities needed before // playing starts go here gotoAndPlay(startFrame); } } onFinished: { console.log("Finished playing") } } \endqml \note Changing width or height of the element does not change the size of the animation within. Also, it is not possible to align the the content inside of a \c LottieAnimation element. To achieve this, position the animation inside e.g. an \c Item. \section1 Rendering Performance Internally, the rendered frame data is cached to improve performance. You can control the memory usage by setting the QLOTTIE_RENDER_CACHE_SIZE environment variable (default value is 2). You can monitor the rendering performance by turning on two logging categories: \list \li \c qt.lottieqt.lottie.render - Provides information how the animation is rendered \li \c qt.lottieqt.lottie.render.thread - Provides information how the rendering process proceeds. \endlist Specifically, you can monitor does the frame cache gets constantly full, or does the rendering process have to wait for frames to become ready. The first case implies that the animation is too complex, and the rendering cannot keep up the pace. Try making the animation simpler, or optimize the QML scene. 23565 -
qlottieanimation_p.h 4734 -
qlottievectorimagecontroller.cpp ! \qmltype LottieVectorImageController \inqmlmodule Qt.labs.lottieqt \inherits QtObject \since 6.12 \brief Provides animation control for a VectorImage that is displaying a Lottie file. VectorImage can display and play Lottie animations, but by itself it provides only rudimentary functionality for controlling the playback. LottieVectorImageController extends VectorImage with more powerful API for querying and controlling the animation. LottieVectorImageController's \l target property specifies the VectorImage to be controlled. It is set by default if the LottieVectorImageController is created as a child or property of a VectorImage. When the VectorImage has loaded a Lottie file, and its \l {VectorImage::status} {status} is \c Ready, the LottieVectorImageController's properties can be read and written, and its functions called, to control the playback. Taken together with VectorImage, LottieVectorImageController mimics the API of the existing LottieAnimation item, so they are typically interchangeable with little effort. (The \c getDuration() function is not provided, since it can be trivially replaced by a simple expression using the endFrame, startFrame and optionally frameRate properties.) \sa VectorImage, {qtlottieviewer Example} 12240 -
qlottievectorimagecontroller_p.h 3038 -