Animated Gif Error
-
I have written a demo like this :
import QtQuick 2.5 import QtQuick.Controls 1.4 ApplicationWindow { visible: true width: 240 height: 240 color: "black" flags: Qt.FramelessWindowHint // 无边框 Rectangle { width: 240; height: 240 AnimatedImage { id: animation; source: "qrc:/test.gif" } } }
The application ran successfully on PC Linux . When I running on Embedded platform ,it caused an exception . "Qml AnimatedImage : Error Reading Animated Image File qrc:/test.gif"
-
@Mr-.Wu
did you maybe forget to deploy Qt's gif imageformat plugin? -
@raven-worx said in Animated Gif Error:
imageformat
how to deploy qt‘s git image format plugin ? can you give a demo or link ? Thansk
-
-
Just encountered the same issue. If it can help someone, here is the solution I used :
Now the GIF support doesn't require a plugin anymore, it is in the "Core Qt GUI library" (http://doc.qt.io/qt-5/qtimageformats-index.html).
If the Error message happens on Embedded platform, most likely your Qt base have been compiled without gif support.In my case (Yocto environment), the solution was simply to add a qtbase bbappend file, with this line :
PACKAGECONFIG_append = "gif"