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. Icons are not visible when installing Qt application on end user machine(Windows) Why?
QtWS25 Last Chance

Icons are not visible when installing Qt application on end user machine(Windows) Why?

Scheduled Pinned Locked Moved General and Desktop
24 Posts 6 Posters 16.0k 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.
  • S Offline
    S Offline
    swhweng
    wrote on last edited by
    #1

    Hello,
    I am junior software developer. I develop desktop applications using Qt application framework for 3 years. Currently I develop application that I putted(added) icons to it's menues' QActions, to buttons, to frames and windows, to textedit. I've created .qrc resource file and added icons from the resource file. I need to install the application on end user Windows XP(7) machine installing only .exe file and .dll libraries from the framework. When I install and launch the application on end user machine the icons are not visible, not loaded.The problem is that I have the icons visible only at the machine (OS) where I compiled and built the application and when putting the .exe file with needed .dlls(QtGui4.dll, QtCore4.dll,mingw10.dll,libgcc_s_dw2_1.dll) on the end user machine ( installation) the icons are not visible,not loaded.
    I have tried to use external binary resources ( I've compiled .qrc file with rcc and putted QResource::registerResource(...) and also I have tried compiled in resources and also tried to put icons from separate files. I made all the needed according to Qt Reference Documentation - the Qt Resource System. My icons are added to to .qrc resource file.
    But I see icons when I launch the application only at machine where I build the application and the icons are invisible when installing on end user machine. I build for Windows XP, 7. I also tried to install on end user machine the Qt SDK and copied my .exe file and .rcc file to directory ../Qt/2010.05/qt/bin, in such a case the icons are visible(loaded). But I don't need the users(clients) installs something else and heavy besides my .exe file and .dlls of Qt you understand.
    Please help, advise what is the problem with icons ( resources ) when you will help me I'll help you too from my experience with Qt.
    Pavel.

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Franzk
      wrote on last edited by
      #2

      Is there a plug-in that is needed for your images to work?

      "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • S Offline
        S Offline
        swhweng
        wrote on last edited by
        #3

        Hi Franzk
        What do you mean plug-in is needed? For what the plug-in?What kind of plug-in?
        No any plugin. It is regular thing the standart Qt SDK is enough,
        simply I've added icons and I do not seem them when installing
        What is the problem

        1 Reply Last reply
        0
        • S Offline
          S Offline
          swhweng
          wrote on last edited by
          #4

          Hi
          I need to clarify what is the problem, so I post in different places

          • the the post relates also to here and to development and installation
            So what is the problem with adding icons to an application?
            Thanks!
          1 Reply Last reply
          0
          • F Offline
            F Offline
            Franzk
            wrote on last edited by
            #5

            Still, it's more of a deployment issue. Also, having the same conversation in two places will be confusing. Don't double post.

            "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply
            0
            • S Offline
              S Offline
              swhweng
              wrote on last edited by
              #6

              Ok
              You understand the thing another
              So what do you think why such a problem?

              1 Reply Last reply
              0
              • F Offline
                F Offline
                Franzk
                wrote on last edited by
                #7

                Standard Qt SDK contains a number of plugins you may not be aware of. Check the $QTDIR/plugins directory.

                What is the type of image you use? How do you reference the icons in your code? Did you use designer or do you hand code them? Did you use the correct path -- it is possible to forget the : and still have the icons in your development build due to amazingly conveniently coincidentally similarly named paths.

                "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

                http://www.catb.org/~esr/faqs/smart-questions.html

                1 Reply Last reply
                0
                • F Offline
                  F Offline
                  Franzk
                  wrote on last edited by
                  #8

                  It's a general rule/guideline on a lot of forums, and has been for a long time. This is not without reason. The confusion might not be here now, but it might come in the future, when people start searching through old posts.

                  "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

                  http://www.catb.org/~esr/faqs/smart-questions.html

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    swhweng
                    wrote on last edited by
                    #9

                    Thank you very much for your reply
                    I do not know did not hear that there is need for additional plugin so as to add ans see icons
                    I add my icons in Qt Designer, before that I add them to resource file
                    The path is ok while I compile and launch the application on machine when it built and I see icons in there places when I've put them while developing?
                    A put .exe, .rcc and dlls to end user and I see no icons?

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      swhweng
                      wrote on last edited by
                      #10

                      See Qt Reference Documentation
                      There is anything about you sould use any plugin so as to manage resources
                      look at
                      Qt Reference Documentation – the Qt Resource System

                      there is wrote all should be ok, but the icons still invisible when installing...

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        swhweng
                        wrote on last edited by
                        #11

                        I have tried also to deploy with dlls from plugins/codecs , plugins/imageformats, plugins/iconengines but still I can't see icons
                        I can see only when I install full Qt SDK and I deploy to qt/bin directory
                        But we understand the end user should not install full Qt SDK so as to use application
                        why such a problem?>

                        1 Reply Last reply
                        0
                        • G Offline
                          G Offline
                          goetz
                          wrote on last edited by
                          #12

                          What's the image type of your icons?

                          http://www.catb.org/~esr/faqs/smart-questions.html

                          1 Reply Last reply
                          0
                          • G Offline
                            G Offline
                            goetz
                            wrote on last edited by
                            #13

                            Closed thread due to duplicate post.

                            Please follow up in http://developer.qt.nokia.com/forums/viewthread/3909/

                            Crossposting is not welcome in this forum (as it is in most other sites). Accept the rules - they are well chosen, you will not change them by arguing anyways. If you need explanations: http://lmgtfy.com/?q=crossposting+bad

                            http://www.catb.org/~esr/faqs/smart-questions.html

                            1 Reply Last reply
                            0
                            • T Offline
                              T Offline
                              tobias.hunger
                              wrote on last edited by
                              #14

                              Just merged the two identical threads into one.

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                swhweng
                                wrote on last edited by
                                #15

                                Hi Volker
                                Thanks for your reply man
                                my icons formats are .ico, .jpeg, .png
                                why do you ask?

                                1 Reply Last reply
                                0
                                • G Offline
                                  G Offline
                                  goetz
                                  wrote on last edited by
                                  #16

                                  If you do not have installed the imageformat plugins correctly, your application is not able to display them (nor any other jpeg, png or ico image).

                                  You must maintain the directory hierarchy of the plugins like in the Qt install dir and you might want to add the plugin dir to the library path (use "QCoreApplication::addLibraryPath() ":http://doc.qt.nokia.com/4.7-snapshot/qcoreapplication.html#addLibraryPath).

                                  http://www.catb.org/~esr/faqs/smart-questions.html

                                  1 Reply Last reply
                                  0
                                  • S Offline
                                    S Offline
                                    swhweng
                                    wrote on last edited by
                                    #17

                                    Yea
                                    sure
                                    but the plugins are installed when I install standart Qt SDK from the site ( open source )
                                    Now I try to include imageformats and iconenginer folders with dlls with my .exe and the dlls when I deploy
                                    Lets see how it installs

                                    1 Reply Last reply
                                    0
                                    • G Offline
                                      G Offline
                                      goetz
                                      wrote on last edited by
                                      #18

                                      Of course you must provide copies of that files in your installation package, as well as the Qt libs.

                                      http://www.catb.org/~esr/faqs/smart-questions.html

                                      1 Reply Last reply
                                      0
                                      • S Offline
                                        S Offline
                                        swhweng
                                        wrote on last edited by
                                        #19

                                        Hello
                                        I deployed today with /plugins/imageformats folder
                                        It works only when I deploy may application exe, main Qt dlls as I mentioned and imageformats folder on windows
                                        Also I looked at Process Monitor output for my application and I see there that my application uses also QtSVG4.dll, QtXML4.dll but I think it is because resources are in xml format...
                                        How can I deploy on MacOS, Ubuntu, Symbian , Maemo?
                                        Thanks
                                        Pavel

                                        1 Reply Last reply
                                        0
                                        • G Offline
                                          G Offline
                                          goetz
                                          wrote on last edited by
                                          #20

                                          [quote author="Pavel Mazniker" date="1298289603"]Hello
                                          I deployed today with /plugins/imageformats folder
                                          It works only when I deploy may application exe, main Qt dlls as I mentioned and imageformats folder on windows[/quote]

                                          Yes. Everyone told you exactly this.

                                          [quote author="Pavel Mazniker" date="1298289603"]Also I looked at Process Monitor output for my application and I see there that my application uses also QtSVG4.dll, QtXML4.dll but I think it is because resources are in xml format...
                                          [/quote]

                                          Yes.

                                          [quote author="Pavel Mazniker" date="1298289603"]How can I deploy on MacOS, Ubuntu, Symbian , Maemo?
                                          Thanks
                                          Pavel[/quote]

                                          Read the docs, search the forum and wiki, ask google and come back with actual questions.

                                          For OS X: the docs provide sufficient information.

                                          For Ubuntu: create a deb.

                                          For Symbian, Maemo: have a look at forum nokia and the docs for the respective platform.

                                          http://www.catb.org/~esr/faqs/smart-questions.html

                                          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