Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Interessed to use Qt Lottie Animation renderer, but somewhat limited...
QtWS25 Last Chance

Interessed to use Qt Lottie Animation renderer, but somewhat limited...

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
animationsvgmodulelottie
1 Posts 1 Posters 911 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • jeanmilostJ Offline
    jeanmilostJ Offline
    jeanmilost
    wrote on last edited by
    #1

    I'm currently using Qt 5.15.2. Reading the Qt documentation, I found a very interesting module named Qt Lottie Animation, which would allow to draw animated images based on Json. This would be a very interesting alternative to using animated SVG images, which are complicated to develop for my design team (miss of tools, necessity to learn script rules, ...) and also because the SVG plugin presents itself many limitations in Qt, and is not really well maintained (At least it is my point of view).

    So I tested this module with the following code...

    import QtQuick 2.15
    import QtQuick.Window 2.15
    
    import Qt.labs.lottieqt 1.0
    
    // NOTE See: https://doc.qt.io/qt-5/qml-qt-labs-lottieqt-lottieanimation.html
    Window
    {
        visible: true
        width: 640
        height: 480
        title: qsTr("Lottie Animation")
    
        Rectangle
        {
            anchors.fill: parent
            color: "white"
    
            LottieAnimation
            {
                anchors.fill: parent
                quality: LottieAnimation.HighQuality
                source: "qrc:/Resources/animation.json"
                autoPlay: true
    
                onStatusChanged:
                {
                    if (status === LottieAnimation.Ready)
                    {
                        console.log("Begin playing");
                    }
                }
    
                onFinished:
                {
                    console.log("Finished playing");
                }
            }
        }
    }
    

    ...and the following images:
    https://lottiefiles.com/1967-download
    https://lottiefiles.com/9744-sample-animation

    And, well, it works, but...

    1. The animation and rendering are very bugged. The animation may not work at all, whereas the rendering causes glitches or may miss important features like line dashing
    2. The image is not stretched, and I couldn't find any option to do that. More generally it seems that very few options are provided to control the rendering and animation

    First of all, I perhaps missed something. Are there existing solutions to the issues I presented above?

    And if not, is this module planned to be maintained and improved in the future, or will it be just provided as is, with very incomplete features and a little abandoned, as it was the case for the SVG module, or can I count on improvements and bug fixes in the future, e.g in Qt6?

    1 Reply Last reply
    1

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved