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. Making icons work in release build : How the heck do I do this?

Making icons work in release build : How the heck do I do this?

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 1.8k Views 3 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.
  • GeraldMonroeG Offline
    GeraldMonroeG Offline
    GeraldMonroe
    wrote on last edited by
    #1

    So I've got a GUI, made in Qt designer. And I made a resource file and I did the "/" prefix and stuffed all my icons in there. I selected the resource file entry for each icon in the GUI.

    Works perfectly when you launch from Qt studio, but when you try to launch the executable or run from another computer, the icons are missing. No errors, no nothing, and no indication of what I'm supposed to do to fix. Putting the icon files in the same directory as the exe does not help. Nor does putting the QRC file there. This resource system logically should embed all the data into the exe itself. It does not seem to. So I don't know how I'm supposed to proceed.

    JKSHJ 1 Reply Last reply
    0
    • GeraldMonroeG GeraldMonroe

      So I've got a GUI, made in Qt designer. And I made a resource file and I did the "/" prefix and stuffed all my icons in there. I selected the resource file entry for each icon in the GUI.

      Works perfectly when you launch from Qt studio, but when you try to launch the executable or run from another computer, the icons are missing. No errors, no nothing, and no indication of what I'm supposed to do to fix. Putting the icon files in the same directory as the exe does not help. Nor does putting the QRC file there. This resource system logically should embed all the data into the exe itself. It does not seem to. So I don't know how I'm supposed to proceed.

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

      Hi @GeraldMonroe, and welcome to the Qt Dev Net!

      Works perfectly when you launch from Qt studio, but when you try to launch the executable or run from another computer, the icons are missing.

      What formats are your icons in?

      You might need to deploy image format plugins. See https://wiki.qt.io/Deploy_an_Application_on_Windows on where to copy the imageformats folder (you only need the DLLs that correspond to the image types that you use)

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

      GeraldMonroeG 1 Reply Last reply
      0
      • JKSHJ JKSH

        Hi @GeraldMonroe, and welcome to the Qt Dev Net!

        Works perfectly when you launch from Qt studio, but when you try to launch the executable or run from another computer, the icons are missing.

        What formats are your icons in?

        You might need to deploy image format plugins. See https://wiki.qt.io/Deploy_an_Application_on_Windows on where to copy the imageformats folder (you only need the DLLs that correspond to the image types that you use)

        GeraldMonroeG Offline
        GeraldMonroeG Offline
        GeraldMonroe
        wrote on last edited by
        #3

        @JKSH .SVG

        JKSHJ 1 Reply Last reply
        0
        • GeraldMonroeG GeraldMonroe

          @JKSH .SVG

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

          @GeraldMonroe said:

          .SVG

          Try deploying imageformats/qsvg.dll and/or iconengines/qsvgicon.dll

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

          GeraldMonroeG 1 Reply Last reply
          1
          • GeraldMonroeG Offline
            GeraldMonroeG Offline
            GeraldMonroe
            wrote on last edited by
            #5

            Nope. As a comment, this is abysmal. It's sheer incompetence. It's not a matter of "learn, n00b", it's just bad design. A software machine should act identically whether launched from the IDE or from the OS - to design it any other way is poor engineering. What's the point of "debugging" if the environment you are debugging in is deliberately made different than the one you run a program from, on the same computer, in the same environment, same everything.

            1 Reply Last reply
            0
            • JKSHJ JKSH

              @GeraldMonroe said:

              .SVG

              Try deploying imageformats/qsvg.dll and/or iconengines/qsvgicon.dll

              GeraldMonroeG Offline
              GeraldMonroeG Offline
              GeraldMonroe
              wrote on last edited by
              #6

              @JKSH Ok, I had a bit of a rage attack. Your "quick and dirty" instructions DO work. It's still a chore but I feel less helpless knowing that the problem seems to be isolatable - if it runs in "release" build from the IDE, but doesn't work with Qt closed, it must be a missing DLL file installed in the Qt /<your_compiler> directory.

              Still. If a DLL file is missing, this should be an error. 100%. Every time. With the exact name and binary signature of the missing file listed in the error message. Qt's DLL loader should check binary signatures as well - none of this "let's just load the wrong dll and crash" possibility of failure. Etc.

              I suppose Qt isn't even meant for windows as a primary platform? Is that's why it is so badly engineered? It's all Microsoft's fault?

              1 Reply Last reply
              0
              • mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by mrjj
                #7

                No, Qt is made for many platforms ( osx, win, linux , android) and image formats are optional and it would be BAD
                if it complained about not loading them as most of you time you dont need those extra image plugins.

                It is THE way to make a deployment folder with the DLLS you need to run on
                fresh pc.
                You could add path to points to Qt release libs so clicking on exe would just launch it
                but its a bad idea as other Qt programs build with different Qt dlls might pick the wrong
                DLL if included in search path for Dlls.

                So its by design. Its not a flaw. It how we want it to work as not to get huge issues/ DLL hell as in old time.

                So Qt use side by side loading of the dlls from the folder where the exe is.
                Its solid design and works really well and also allow to have multiple version of Qt installed and more.

                I personally find this site good for listing minimal DLLS
                http://www.tripleboot.org/?p=138

                and there is also tool
                The Windows Deployment Tool
                http://doc.qt.io/qt-5/windows-deployment.html

                So make your deployment folder once and use it to test your exe outside of Creator.

                1 Reply Last reply
                1

                • Login

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