Can't get QtQuick AnimatedImage gif file to show in release version but works in debug

  • I am trying to deploy an application that uses a pic.gif as an AnimatedImage. The code works for debug but not for release.

    I have the qml files and main.cpp in a folder called demo. I have the pictures in a subfolder called images. I have added all qml and pic files as resources but get this error when executing the release version from QtCreator: QML AnimatedImage: Error Reading Animated Image File qrc:///images/Bear_claw.gif.

    Here is qml.qrc:

    <qresource prefix="/">

    Here is AnimatedEngine.qml: ` import QtQuick 2.1

    Rectangle {
        color: backgroundcolor
        focus: activeFocus
        AnimatedImage {
            id: sprite
            anchors.centerIn: parent
            source: "images/Bear_claw.gif"

    I know this is a novice issue and I have tried many of the recommended fixes I found here and in other places like adding an alias in the .qrc file and changing the source to have qrc:///, images/images/pic.gif etc but none of the recommendations solve the problem. I think it has more to do with an environment variable setting or something. I am running Qt5.6.0/5.6/mingw49_32.

    Thanks in advance for any help you can give me.

  • Moderators

    please set the QT_PLUGIN_PATH (to non-zero value) and post the output from the console.
    I guess you are missing the qgif imageplugin in release mode?

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.