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. Can't get QtQuick AnimatedImage gif file to show in release version but works in debug
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 2.0k Views 1 Watching
  • 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.
  • LyneRL Offline
    LyneRL Offline
    LyneR
    wrote on last edited by
    #1

    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="/">
        <file>demo.qml</file>
        <file>AnimatedEngine.qml</file>
        <file>images/Bear_claw.gif</file>
    </qresource>
    

    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.

    raven-worxR 1 Reply Last reply
    0
    • LyneRL LyneR

      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="/">
          <file>demo.qml</file>
          <file>AnimatedEngine.qml</file>
          <file>images/Bear_claw.gif</file>
      </qresource>
      

      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.

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @LyneR
      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?

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0

      • Login

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