Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Extension Plugins
Forum Updated to NodeBB v4.3 + New Features

Extension Plugins

Scheduled Pinned Locked Moved Installation and Deployment
16 Posts 4 Posters 6.9k 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.
  • AlicemirrorA Offline
    AlicemirrorA Offline
    Alicemirror
    wrote on last edited by
    #1

    Hi, I restart a specific discussion about I read some partially answers as a collateral problem in other discussions I posted in the forums.

    I am experiencing that some components / elements like jpeg images are not shown in the release while works fine in the development environment.
    To be clear: under the Windows XP (and Windows 7 too) where I run (debug or release mode) the Qt-Quick application this works fine and loads correctly the jpeg images.

    Then using the Dependency Viewer I create a folder with all the dll and components needed to the application to run without Qt-SDK installed.

    When I run the application in this folder in a fresh installed machine (XP / W7) all workds, but jpeg images are not shown.

    Initially I thought to a sort of error or mismatch in the code, but it was so strange... Then I read in a post that some components, like svg files and jpeg uses extensions plugins (I think that are Qt standard plugins delivered with the SDK or Qt-Creator) that are linked/(called at runtime, so these can't be identified by Dependency viewer. How can I see what e-plugins are missed? Where I can find them? If the problem is this... But this possibility seems reasonably true.

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

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      The plugins can be found in the plugins subdirectory of your Qt tree. In my case, they are here: C:\Qt\2010.05\qt\plugins\imageformats

      You can distribute them like this:
      YourCoolApplication.exe
      QtCore4.dll
      QtGui4.dll
      ... (other needed libs)
      imageformats\qjeg4.dll
      imageformats\qgif4.dll
      ...

      the same goes for other plugins. You can use other locations, but make sure that they are in the plugin path that you supply using QCoreApplication::addLibraryPath().

      1 Reply Last reply
      0
      • G Offline
        G Offline
        giesbert
        wrote on last edited by
        #3

        I think, the question is: how do I know, which plugins are needed?

        For "normal" dll, you can ask Dependency viewer. But how do you know, which plug-ins are needed for your app?

        Nokia Certified Qt Specialist.
        Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          I know of no automated way to determine that, but it really isn't that hard to come up with an answer:

          • For each type of image you use, you need the corresponding plugin.
          • For each type of database you wish to connect to, you need the corresponding plugin.
          • For each type of codec you wish to support, you need the corresponding plugin.
          • ...

          Basically: take a look at the types of plugins supplied in the folder I pointed out, and draw your conclusions. Every plugable subsystem in Qt needs the corresponding plugins to work properly, though you can build Qt in such as way that support is compiled in instead of supplied by a plugin (at least, for most of them, I think).

          1 Reply Last reply
          0
          • AlicemirrorA Offline
            AlicemirrorA Offline
            Alicemirror
            wrote on last edited by
            #5

            Andre and Gerolf, thank you very very much!!! You are saving a poor developer :)

            @Gerolf: I read in a post a couple of day ago, that you wrote about e-plugin... Now I searched in the doc and found the principle, but this is now very clear.

            @Andre: I see that is a good clear means that for every ... there is a plugin. Why there is a so poor documentation on Qt about program delivery? Ok, Then I think that if I have a database or image type etc, if a plugin is needed and almost what can be can be found on Qt documentation.

            I have already read somewhere that plugins need to be delivered in a "plugin" folder.

            bq. make sure that they are in the plugin path that you supply using QCoreApplication::addLibraryPath().

            How can I set the library path in a Qt-quick project? There is a QML equivalent or I addLibraryPath() in my main.cpp code?

            Many thanks.

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

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #6

              Just put it in the main(), or use the default layout that I illustrated above. The documentation is not that poor, it is just that among all the other documentation, it is a bit hard to find. It is there though.

              1 Reply Last reply
              0
              • AlicemirrorA Offline
                AlicemirrorA Offline
                Alicemirror
                wrote on last edited by
                #7

                Thank you very much, Andre!

                The fact is that I am worried when ask things that seems stupid and is sufficient to search somewhere... As a matter of fact it's a bit difficult to find the documentation sometimes...

                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 last edited by
                  #8

                  There is a wiki article "Dependencies in Qt":http://developer.qt.nokia.com/wiki/Qt_Library_Cross_Dependencies (formerly know as Qt Library Cross Dependencies). It shows you which other Qt libs are required by some Qt lib or plugin.

                  Then you have the generic "deployment instructions":http://doc.qt.nokia.com/4.7/deployment.html and those for the specific platforms (eg. for "Windows":http://doc.qt.nokia.com/4.7/deployment-windows.html). The latter has a specific note about distribution "Qt plugins":http://doc.qt.nokia.com/4.7/deployment-windows.html#qt-plugins. And it also mentions the usage of QCoreApplication::addLibraryPath().

                  I believe this docs are quite complete.

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

                  1 Reply Last reply
                  0
                  • AlicemirrorA Offline
                    AlicemirrorA Offline
                    Alicemirror
                    wrote on last edited by
                    #9

                    Hi Volker, always perfect and resolutive interventions, as usual :)

                    As I wrote above, I found somewhere about QCoreApplication::addLibraryPath() and now I remember that was in the "deploying under windows document". It's quite complete, but what I had not clear (doc is complete but my understanding not sure...) was how to search and how to integrate the standard plugins. I understood that the described plugin usage was for program plugins (there is also a good example in the touch and pain)t, if I remember). So I don't thought that it may be also for Qt extended plugins.

                    If I understood it means that some standard features of Qt are plugins just as those features that the developer can add to the application as specific plugins.

                    Many thanks. The help of the forum members to disambiguate these things is really essential.

                    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 last edited by
                      #10

                      [quote author="Alicemirror" date="1300056182"]
                      If I understood it means that some standard features of Qt are plugins just as those features that the developer can add to the application as specific plugins.
                      [/quote]

                      Yep, that's exactly the point. The standard set of features in plugins are:

                      • Support for Accessibility: in dir accessible
                      • Bearer management: in dir bearer
                      • Text-Codecs (for en/decoding non-latin texts): in dir codecs, eg. qjpcodecs
                      • Add-Ons for Qt Designer: in dir designer, eg. qt3support or phononwidgets
                      • Graphics systems: in dir graphicssystems, eg. for OpenGL
                      • Support for additional icon formats: in dir iconengines, eg. qsvgicons for SVG icons
                      • Image formats: in dir imageformats, eg. qjpeg, qsvg, qtiff, qgif
                      • Backends for Phonon: in dir phonon_backend
                      • Tools for QML: in dir qmltooling
                      • Drivers for SQL databases: in dir sqldrivers, eg. qsqlite (SQLite), qsqlmysl (MySQL), qsqlpsql (PostgreSQL)

                      Be aware that some of the plugins require additional Qt libs. For example the qsvgicons plugin needs QtXml lib, as it is an XML based format. Some other plugin require the installation of additional non-Qt libs (eg. most of the SQL drivers). Those additional libraries need to go into the standard library path (on windows: the dir where the exe lives; on the mac: the Frameworks directory in the application bundle).

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

                      1 Reply Last reply
                      0
                      • AlicemirrorA Offline
                        AlicemirrorA Offline
                        Alicemirror
                        wrote on last edited by
                        #11

                        This explanation is Great!!! Thank Volker.

                        If a terrestrial, mad but not yet mad scientist, where find this informations, also fragmented?

                        Then I have a question about my misunderstandings. In plugins path I set the path where I deliver my plugins for the program release to the users, I suppose the obvious path should be "plugins".
                        When I am in the Qt-Quick environment, I need also to put the plugins in my directory or they work because part of the IDE / Development environment ?

                        Thank.

                        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 last edited by
                          #12

                          Uhm I don't remember where and when I soaked up that information. It's some years ago, when we had to ship the windows version of our application. Once you know it, you never forget it again :-)

                          The path can be any arbitrary one, but "plugins" comes into mind instantly - and it is where the user would expect it :-)

                          Regarding the QML plugins, I cannot give you any advice here, I have no experience with QML so far. But have a look at the Qt Quick form, I remember this being asked a couple of times.

                          Ah, and in my previous post, I forgot to mention that you need a plugins base directory and the various types of the Qt plugins must reside in their respective subdirectory. A common directory layout would be:

                          @
                          AppDir
                          +--MyFancyApp.exe
                          +--QtCore4.dll
                          +--QtGui4.dll
                          +--PlugIns
                          | +--imageformats
                          | | +--qjpeg.dll
                          | | +--qtiff.dll
                          | +--sqldrivers
                          | +--qsqlite.dll
                          | +--qsqlmysql.dll
                          +--mysql.dll
                          @

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

                          1 Reply Last reply
                          0
                          • AlicemirrorA Offline
                            AlicemirrorA Offline
                            Alicemirror
                            wrote on last edited by
                            #13

                            THank you. Very good explanation. You saved a lot of my time :)

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

                            1 Reply Last reply
                            0
                            • A Offline
                              A Offline
                              andre
                              wrote on last edited by
                              #14

                              [quote author="Volker" date="1300060011"]
                              @
                              AppDir
                              +--MyFancyApp.exe
                              +--QtCore4.dll
                              +--QtGui4.dll
                              +--PlugIns
                              | +--imageformats
                              | | +--qjpeg.dll
                              | | +--qtiff.dll
                              | +--sqldrivers
                              | +--qsqlite.dll
                              | +--qsqlmysql.dll
                              +--mysql.dll
                              @

                              [/quote]

                              As far as I know, this layout is incorrect: the PlugIns directory doesn't belong there. Instead, the different plugin directories go directly into the application dir. At least, that is how I distribute my applications on windows, and that works.

                              1 Reply Last reply
                              0
                              • AlicemirrorA Offline
                                AlicemirrorA Offline
                                Alicemirror
                                wrote on last edited by
                                #15

                                As for I read and understood regarding paths and plugins distribution both these methods are valid. I can test not before today evening.

                                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 last edited by
                                  #16

                                  [quote author="Andre" date="1300082792"]
                                  As far as I know, this layout is incorrect: the PlugIns directory doesn't belong there. Instead, the different plugin directories go directly into the application dir. At least, that is how I distribute my applications on windows, and that works.
                                  [/quote]

                                  We have to ship some other plugins too, it would clutter the toplevel directory, so we decided to put it into that subdir. An we use the QCoreApplication::addLibraryPath()[1] approach, so it does not harm. With the default settings there is too much guessing where the plugins are located, we think this is the most robust way.

                                  fn1. use this for the path:
                                  @
                                  QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath() + "/PlugIns");
                                  @

                                  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