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. [Resolved] Image doesn't load on Screen... [Windows only]
Forum Updated to NodeBB v4.3 + New Features

[Resolved] Image doesn't load on Screen... [Windows only]

Scheduled Pinned Locked Moved General and Desktop
12 Posts 2 Posters 5.1k 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.
  • A Offline
    A Offline
    AcerExtensa
    wrote on last edited by
    #2

    have you copied imageformats folder with your exe? http://doc.qt.digia.com/qq/qq10-windows-deployment.html

    God is Real unless explicitly declared as Integer.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dcbasso
      wrote on last edited by
      #3

      With same configurations on Linux works, every image is on binaria/executable file...
      I will read this documentation to see what's can be!

      • in Linux my executable file has 28mb, for Windows has only 2mb!
      1 Reply Last reply
      0
      • A Offline
        A Offline
        AcerExtensa
        wrote on last edited by
        #4

        have you copied imageformats folder "on windows" with your exe?

        @Plugins work differently to normal DLLs, so we can't just copy them into the same directory as our application's executable as we did with the Qt DLL. Qt applications look for plugins in a subdirectory within the their own directory, for instance, an image format plugin should be in the application's imageformats subdirectory, and a SQL driver plugin should be in the application's sqldrivers subdirectory.

        So to make the JPEG plugin available to our showimg application, we just have to change directory to the application's directory and copy over the appropriate DLL:
        mkdir imageformats
        copy %QTDIR%\plugins\imageformats\qjpeg100.dll imageformats@

        God is Real unless explicitly declared as Integer.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dcbasso
          wrote on last edited by
          #5

          For every windows application that I compile I will need to add a folder /imageformats?

          If I put this folder structure:
          @
          /install_app_folder
          Application.exe
          file0.dll
          ...
          file5.dll
          /imageformats
          qgif4.dll
          qico4.dll
          qjpeg4.dll
          qmng4.dll
          qsvg4.dll
          qtiff4.dll
          @

          On my Application code Can I add this line?
          @
          qApp->addLibraryPath( QDir::currentPath() );
          @

          Or I will not need change nothing on my application?!

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

            bq. For every windows application that I compile I will need to add a folder /imageformats?

            Yes. For each dynamically compiled app on windows

            bq. On my Application code Can I add this line?

            You don't need in folder structure like you have posted. "." is included in any windows app

            God is Real unless explicitly declared as Integer.

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dcbasso
              wrote on last edited by
              #7

              OK!
              I will try using a dynamically way, that's come by default in QtSDK, and I will not need to recompile my application to add the line "qApp->addLibraryPath(*)".

              Checking here...

              1 Reply Last reply
              0
              • D Offline
                D Offline
                dcbasso
                wrote on last edited by
                #8

                I try this:

                @
                /install_app_folder
                Application.exe
                file0.dll
                ...
                file5.dll
                /imageformats
                qgif4.dll
                qico4.dll
                qjpeg4.dll
                qmng4.dll
                qsvg4.dll
                qtiff4.dll
                @

                and this:

                @
                /install_app_folder
                Application.exe
                file0.dll
                ...
                file5.dll
                /plugins/imageformats
                qgif4.dll
                qico4.dll
                qjpeg4.dll
                qmng4.dll
                qsvg4.dll
                qtiff4.dll
                @

                Nothing change! The problem persists!
                The imagens that I set in Form Files works as expected!

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  dcbasso
                  wrote on last edited by
                  #9

                  Man sorry!
                  Works for!!! I just copy a different copy of folder! Now I copy the right qt version of folder and Works very nice!
                  Thanks a lot!!!

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    dcbasso
                    wrote on last edited by
                    #10

                    Well...
                    Now I'm having problems with SVG imagens inside my Project, on resources file!
                    As I already say, on linux works everthing nice! I'm having problems only in Windows... I will try find some dll that can be missing on my installer.

                    Thanks all!

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      dcbasso
                      wrote on last edited by
                      #11

                      I don't know where is the problem!
                      I add the plugins folder with svg dll, gif dll, jpeg dll and others, but the SVG still not loading the image!
                      I load the svg file on QWebView and at Linux works as espected, but on Windows the svg file it's not loaded!

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        dcbasso
                        wrote on last edited by
                        #12

                        Resolved:

                        Add to installer the plugins:

                        @
                        iconengines
                        sqldrivers
                        @

                        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