Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QMovie, gif and QRC

QMovie, gif and QRC

Scheduled Pinned Locked Moved General and Desktop
qmoviegifwindowsdeployqrc
6 Posts 4 Posters 6.8k 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.
  • Q Offline
    Q Offline
    quniq
    wrote on last edited by
    #1

    Hello
    I'm trying to deploy application for Windows. I am using a QMovie widget with gif loaded to play. The problem is, movie.isValid() says that it is not.
    I can see, that my gif is listed in the qrc file, and all files listed are converted to qrc_ProgramName.cpp (with gif).
    All pictures are included (and visible in program), so I think, that all files are attached to exe.

    The problem is that QMovie doesn't play gif animation.
    I've found, that it is neccesary to deploy application with qgif.dll file, but it still doesn't work...
    Please, help me!

    I am using 2 toolchains:
    Qt 5.3.1 with mingw 4.82 x32
    Qt 5.4.1 with mingw 4.91 x32

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      How did you deploy your application ? Did you put everything in the correct location ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • L Offline
        L Offline
        LuGRU
        wrote on last edited by
        #3

        Hello,
        Maybe your missing ":/" or "qrc:/" in path to Your gif (or path to the gif inside resource is wrong)?

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          quniq
          wrote on last edited by quniq
          #4

          Thank you for reply.

          My full qrc file (spaces are removed...):

          <RCC>
          <qresource prefix="/">
          <file>langs/pl.qm</file>
          <file>langs/hu.qm</file>
          <file>icons/wait_animation.gif</file>
          <file>langs/pl.ts</file>
          <file>langs/hu.ts</file>
          <file>icons/wait_animation_trans.gif</file>
          <file>icons/Previous-icon.png</file>
          <file>icons/Next-icon.png</file>
          <file>icons/Symbols-Delete-icon.png</file>
          </qresource>
          </RCC>

          All files are in folders as listed (in project). In deployed program those files do not need to be found in program folder.

          Code fragment:

          QMovie *movie = new QMovie(this);
          movie->setFileName(":/icons/wait_animation_trans.gif");

          How did I deploy? Simply built application in release, and copied it into separate folder with dll's:
          icudt52.dll
          icuin52.dll
          icuuc52.dll
          libgcc_s_dw2-1.dll
          libstdc++-6.dll
          libwinpthread-1.dll
          qgif.dll
          Qt5Core.dll
          Qt5Gui.dll
          Qt5Multimedia.dll
          Qt5SerialPort.dll
          Qt5Widgets.dll

          Fragments of my *.pro file:

          RESOURCES += ResidentsList.qrc
          RC_FILE = ResidentsList.rc
          TRANSLATIONS += langs/pl.ts
          TRANSLATIONS += langs/hu.ts
          QTPLUGIN += qgif

          I don't have any more ideas...

          JKSHJ 1 Reply Last reply
          0
          • Q quniq

            Thank you for reply.

            My full qrc file (spaces are removed...):

            <RCC>
            <qresource prefix="/">
            <file>langs/pl.qm</file>
            <file>langs/hu.qm</file>
            <file>icons/wait_animation.gif</file>
            <file>langs/pl.ts</file>
            <file>langs/hu.ts</file>
            <file>icons/wait_animation_trans.gif</file>
            <file>icons/Previous-icon.png</file>
            <file>icons/Next-icon.png</file>
            <file>icons/Symbols-Delete-icon.png</file>
            </qresource>
            </RCC>

            All files are in folders as listed (in project). In deployed program those files do not need to be found in program folder.

            Code fragment:

            QMovie *movie = new QMovie(this);
            movie->setFileName(":/icons/wait_animation_trans.gif");

            How did I deploy? Simply built application in release, and copied it into separate folder with dll's:
            icudt52.dll
            icuin52.dll
            icuuc52.dll
            libgcc_s_dw2-1.dll
            libstdc++-6.dll
            libwinpthread-1.dll
            qgif.dll
            Qt5Core.dll
            Qt5Gui.dll
            Qt5Multimedia.dll
            Qt5SerialPort.dll
            Qt5Widgets.dll

            Fragments of my *.pro file:

            RESOURCES += ResidentsList.qrc
            RC_FILE = ResidentsList.rc
            TRANSLATIONS += langs/pl.ts
            TRANSLATIONS += langs/hu.ts
            QTPLUGIN += qgif

            I don't have any more ideas...

            JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by
            #5

            Hi,

            @quniq said:

            How did I deploy? Simply built application in release, and copied it into separate folder with dll's:
            icudt52.dll
            icuin52.dll
            icuuc52.dll
            libgcc_s_dw2-1.dll
            libstdc++-6.dll
            libwinpthread-1.dll
            qgif.dll
            Qt5Core.dll
            Qt5Gui.dll
            Qt5Multimedia.dll
            Qt5SerialPort.dll
            Qt5Widgets.dll

            qgif.dll needs to be in a subfolder. See http://wiki.qt.io/Deploy_an_Application_on_Windows

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            1 Reply Last reply
            1
            • Q Offline
              Q Offline
              quniq
              wrote on last edited by quniq
              #6

              And that's the information I missed. I found that qgif should be in 'plugins' folder, but it seems to work in qt4 only. qfgif.dll has to be stored in 'imageformats' subfolder.
              Thanks a lot!

              1 Reply Last reply
              0
              • JonBJ JonB referenced this topic on

              • Login

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