Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved QT5 QImage::save function doesn't work in some PC s

    General and Desktop
    3
    7
    1698
    Loading More Posts
    • 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.
    • M
      manuntn08 last edited by

      I have been in a (QT & C++) project. When I build and release a new version, it works well in my Pc, i put it on the server for clients, so many clients reported that it can't save image functionality in Qt5.
      In fact, i have just changed Qt4 to Qt5 for a while. In the past, i never saw this issue. I tested so many times and it worked in my PC and also on the server in my own PC. The problem is that if the clients copy their own .dll files (especially QT5Core.dll) and put it into the project, it works in their PCs; not in mine. I also used Dependency Walker to see the difference between QT5Core.dlls but i can't find out.
      So i don't understand what's really happening inside? I think on the server, everyone using the same .dlls files in the project , .....
      Thanks in advance for any advise.

      jsulm 1 Reply Last reply Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion @manuntn08 last edited by

        @manuntn08 Are you maybe missing plug-ins?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        M 1 Reply Last reply Reply Quote 2
        • M
          manuntn08 @jsulm last edited by

          @jsulm said in QT5 QImage::save function doesn't work in some PC s:

          plug-ins

          Thanks for your advise, but i don't know how to check plug-ins, can you detail a little more how to do it ?

          jsulm 1 Reply Last reply Reply Quote 0
          • jsulm
            jsulm Lifetime Qt Champion @manuntn08 last edited by

            @manuntn08 If you say saving pictures does not work - what does it mean exactly? Are there any errors? Are the files corrupted?
            You can find plug-ins in your Qt installation. If you deploy your app you should add needed plug-ins to it. There are plug-ins for image formats as well (plugins/imageformats).
            See http://doc.qt.io/qt-5/windows-deployment.html

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            M 1 Reply Last reply Reply Quote 1
            • M
              manuntn08 @jsulm last edited by

              @jsulm in fact, when i tested in local or also on the server of my own PC, it worked. But another PC didn't work. The save function returns false; when i deploy my app, i just build->release, after that, i put (.exe file + .dlls necessary in the project) on the server. I did this way so many times in the past with QT4, and it worked. Now, i have changed to QT5, and this issue appeared.

              jsulm D 2 Replies Last reply Reply Quote 0
              • jsulm
                jsulm Lifetime Qt Champion @manuntn08 last edited by

                @manuntn08 Try this: set QT_DEBUG_PLUGINS=1 before starting your app in a terminal window, then start your app and check the output on the console (post the output here).
                See https://doc.qt.io/qt-5.10/deployment-plugins.html

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply Reply Quote 2
                • D
                  Devopia53 @manuntn08 last edited by

                  @manuntn08

                  What's the result of QImageReader::supportedImageFormats()?

                  1 Reply Last reply Reply Quote 1
                  • First post
                    Last post