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. No icons when deploy application using SVG files
Forum Updated to NodeBB v4.3 + New Features

No icons when deploy application using SVG files

Scheduled Pinned Locked Moved General and Desktop
19 Posts 4 Posters 18.2k 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.
  • T Offline
    T Offline
    torsten
    wrote on 5 Feb 2011, 00:54 last edited by
    #1

    Hello,

    i'm having trouble to deploy an application with svg images. If i use png files there is no problem. i tried nearly everything like adding

    @Q_INIT_RESOURCE(application);@

    or using a qt.conf

    @[Paths]
    Plugins = plugins@

    and copied the plugins/imageformats (also iconengines and sqldrivers) folder.

    i'm not sure what i'm do wrong... (i also using sqlite, if i point with Plugins to nowhere its not working, with Plugins=plugins it works again, so it can't be the wrong path)

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on 5 Feb 2011, 14:28 last edited by
      #2

      Which platform are you on?

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

      1 Reply Last reply
      0
      • T Offline
        T Offline
        torsten
        wrote on 5 Feb 2011, 14:34 last edited by
        #3

        I'm on windows... i figured out... it was the qtmxl4.dll. The DependencyWalker didn't show it, but to show svg files you have to delpoy xml to (ok, svg files are xml files;-) ). But no site and no doc shows this depenency

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on 5 Feb 2011, 14:40 last edited by
          #4

          AFAIK, the dependency walker does not consider the plugins. But you can load the plugin itself into dependency walker and it shows the needed QtXml then.

          The missing cross dependencies is indeed a good point. These should be listed somewhere.

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

          1 Reply Last reply
          0
          • G Offline
            G Offline
            goetz
            wrote on 5 Feb 2011, 19:29 last edited by
            #5

            [quote author="Volker" date="1296916827"]The missing cross dependencies is indeed a good point. These should be listed somewhere.[/quote]

            I've just added "Qt library cross dependencies":http://developer.qt.nokia.com/wiki/Qt_library_cross_dependencies to the wiki.

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

            1 Reply Last reply
            0
            • T Offline
              T Offline
              torsten
              wrote on 16 Feb 2011, 18:23 last edited by
              #6

              Damn... again...
              The QtXml was only in first place a problem... so it works on my system... but after deploy i have the same problems like before... no sqldriver, no icons...

              1 Reply Last reply
              0
              • T Offline
                T Offline
                torsten
                wrote on 16 Feb 2011, 22:39 last edited by
                #7

                I compiled a static version of qt from source based on "this":http://developer.qt.nokia.com/wiki/Build_Static_Qt_For_Windows_With_Gcc_German

                After build a static version of my program i the i have sqlite support, but the icons are still missing (did i forget a parameter?)

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  goetz
                  wrote on 16 Feb 2011, 23:12 last edited by
                  #8

                  You need

                  • QtSvg library
                  • plugin iconengines/libqsvgicon.dll
                  • plugin imageformats/libqsvg.dll
                  • the dependencies: QtCore, QtGui, QtXml library

                  all in the proper directories.

                  Also, you might want to add the plugin path manually. Add the following your main function, right before doing any Qt related stuff that needs the plugins (eg. GUI classes):

                  @
                  QStringList libPaths = QCoreApplication::libraryPaths();
                  libPaths << QCoreApplication::applicationDirPath + "/plugins";
                  QCoreApplication::setLibraryPaths(libPaths);
                  @

                  I have the above in my code and all plugins are found.

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

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    torsten
                    wrote on 17 Feb 2011, 00:20 last edited by
                    #9

                    Still nothing (or its to late...)
                    Maybe i make a mistake, so step for step:

                    1. clone my rep: git@gitorious.org:fixtestpc/fixtestpc.git
                    2. open project with qt-creator
                    3. add your code to main/main.cpp
                    4. choose project "main" and build it with "release" (takes 3-4 minutes)
                    5. copy the application to INSTALL
                    6. copy libgcc_s_dw2-1.dll mingwm10.dll QtCore4.dll QtGui4.dll QtOpenGL4.dll QtSvg4.dll QtXml4.dll from C:\Qt\2010.05\qt\bin to INSTALL
                    7. copy qsvg4.dll from C:\Qt\2010.05\qt\plugins\imageformats to INSTALL/plugins
                    8. copy qsvgicon4.dll from C:\Qt\2010.05\qt\plugins\iconengines to INSTALL/plugins
                    9. copy qsqlite4.dll from C:\Qt\2010.05\qt\plugins\sqldrivers to INSTALL/plugins

                    deploy the application to another computer ... application without svg images and sqlite support...

                    tomorrow (nope... today) i have diploma defense and this thing will not work -.-

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      goetz
                      wrote on 17 Feb 2011, 12:00 last edited by
                      #10

                      You have wrong paths:

                      • QSvg4.dll goes into INSTALL
                      • the plugins must go into a subdir of plugins with the same name they came from (qsvgicon4.dll goes to INSTALL/plugins/iconengines/; qsqlite4.dll goes to INSTALL/plugins/sqldrivers and so on)

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

                      1 Reply Last reply
                      0
                      • T Offline
                        T Offline
                        torsten
                        wrote on 17 Feb 2011, 16:47 last edited by
                        #11

                        That helped... thx.
                        But i had another problem... i've added your code before create the application... so the path wasn't set correct.

                        Thx for help

                        1 Reply Last reply
                        0
                        • G Offline
                          G Offline
                          goetz
                          wrote on 17 Feb 2011, 16:49 last edited by
                          #12

                          You should add the code in the main() function, after the creation of QApplication but before doing the GUI stuff.

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

                          1 Reply Last reply
                          0
                          • T Offline
                            T Offline
                            torsten
                            wrote on 17 Feb 2011, 17:00 last edited by
                            #13

                            yes... i did... but not in the first time ;-)

                            1 Reply Last reply
                            0
                            • J Offline
                              J Offline
                              jorj
                              wrote on 1 Mar 2011, 13:06 last edited by
                              #14

                              This looks like exactly the problem i am having... it is very irritating that it works fine in debug on dev machines, and only breaks on user machines...

                              Thanks Volker, i will try it tonight.

                              1 Reply Last reply
                              0
                              • G Offline
                                G Offline
                                goetz
                                wrote on 1 Mar 2011, 13:13 last edited by
                                #15

                                Sorry, that's not irritating, but just plain normal.

                                On you dev machines you have everything in place, so the parts needed are found. On the user machines you have to install every single piece yourself, if only one is missing, your applications or parts of it can break.

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

                                1 Reply Last reply
                                0
                                • AlicemirrorA Offline
                                  AlicemirrorA Offline
                                  Alicemirror
                                  wrote on 1 Mar 2011, 15:16 last edited by
                                  #16

                                  Volker, it seems a similar problem I had using jpg against png images. But in my case I set properly all the dll and the problem remain unsolved... Is it possible that the same principle can be applied also in my case?

                                  Thks

                                  Enrico Miglino (aka Alicemirror)
                                  Balearic Dynamics
                                  Islas Baleares, Ibiza (Spain)
                                  www.balearicdynamics.com

                                  1 Reply Last reply
                                  0
                                  • G Offline
                                    G Offline
                                    goetz
                                    wrote on 1 Mar 2011, 15:40 last edited by
                                    #17

                                    [quote author="Alicemirror" date="1298992583"]Volker, it seems a similar problem I had using jpg against png images. But in my case I set properly all the dll and the problem remain unsolved... Is it possible that the same principle can be applied also in my case?
                                    [/quote]

                                    Yes, of course. It does not depend if your dealing with svg or png or jpg (despite the fact that you might have different "cross dependencies":http://developer.qt.nokia.com/wiki/Qt_library_cross_dependencies

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

                                    1 Reply Last reply
                                    0
                                    • AlicemirrorA Offline
                                      AlicemirrorA Offline
                                      Alicemirror
                                      wrote on 1 Mar 2011, 16:32 last edited by
                                      #18

                                      Mmmh... Strange that my previous post about this you missed.
                                      If you have five minutes, please take a look to the link: http://developer.qt.nokia.com/forums/viewthread/4028/ This was my first post, but the moderator moved this to the area related to deployment and installations... Then I find a solution (not a final solution, but a solution for this particular case) here:
                                      http://developer.qt.nokia.com/forums/viewthread/4087/
                                      But this post is actually without answer...

                                      Thks.

                                      Enrico Miglino (aka Alicemirror)
                                      Balearic Dynamics
                                      Islas Baleares, Ibiza (Spain)
                                      www.balearicdynamics.com

                                      1 Reply Last reply
                                      0
                                      • G Offline
                                        G Offline
                                        goetz
                                        wrote on 1 Mar 2011, 16:37 last edited by
                                        #19

                                        [quote author="Alicemirror" date="1298997133"]Mmmh... Strange that my previous post about this you missed.
                                        If you have five minutes, please take a look to the link: http://developer.qt.nokia.com/forums/viewthread/4028/ This was my first post, but the moderator moved this to the area related to deployment and installations... Then I find a solution (not a final solution, but a solution for this particular case) here:
                                        http://developer.qt.nokia.com/forums/viewthread/4087/
                                        But this post is actually without answer...

                                        Thks.[/quote]

                                        I merged both threads as it's on the very same topic. You've been pointed to some reading - not clear if you read (and and understood) these already.

                                        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