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. Unable to see images after deploymenmt .
QtWS25 Last Chance

Unable to see images after deploymenmt .

Scheduled Pinned Locked Moved General and Desktop
15 Posts 5 Posters 4.1k 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.
  • V Offline
    V Offline
    vivekmalik2466
    wrote on last edited by
    #5

    I am using resource file named "resources.qrc".
    In resource file I have given prefix "/resources/images" and using main.jpg as alias. But the original path is different. It is working for .png files but not working for .jpg

    @Image {
    id: image1
    width: parent.width
    height: parent.height
    fillMode: Image.Stretch
    smooth: true
    z: 0
    opacity: 0.940
    source: "qrc:///resources/images/main.jpg"
    }@

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #6

      Ah, QML. I had a similar issue, too. Reinstalling my system was the solution :P but that is not optimal. I'm almost certain Qt's image plugins are to be blamed, but I have no definite answer.

      (Z(:^

      1 Reply Last reply
      0
      • A Offline
        A Offline
        AlekseyOk
        wrote on last edited by
        #7

        Hi!
        You should deploy appropriate image formats plugins too from %QTDIR%/plugins/imageformats.
        For jpeg in your case

        1 Reply Last reply
        0
        • R Offline
          R Offline
          raaghuu
          wrote on last edited by
          #8

          [quote author="AlekseyOk" date="1343047105"]Hi!
          You should deploy appropriate image formats plugins too from %QTDIR%/plugins/imageformats.
          For jpeg in your case[/quote]

          Thank you for this info... though could you tell how to find/compile the required files

          1 Reply Last reply
          0
          • K Offline
            K Offline
            KA51O
            wrote on last edited by
            #9

            See "this related thread":http://qt-project.org/forums/viewthread/17342 (its about another image plugin for .ico images, but it applies to your problem as well). The plugin libs can be found in the QTDIR/plugins/imageformats directory as mentioned before.

            1 Reply Last reply
            0
            • V Offline
              V Offline
              vivekmalik2466
              wrote on last edited by
              #10

              i am reading lots of images form disk those are having different format ,here i am unable to read all.because they all are randomly generated by other media resources and creating image named "Folder.jpg.pnj,etc".so converting image format is not the solution for me.

              1 Reply Last reply
              0
              • K Offline
                K Offline
                KA51O
                wrote on last edited by
                #11

                No need to convert image formats you just need to provide all the plugins for the different formats. Have a look in the QTDIR/plugins/imageformats folder the libs there cover pretty much all formats.

                1 Reply Last reply
                0
                • V Offline
                  V Offline
                  vivekmalik2466
                  wrote on last edited by
                  #12

                  i am trying to add plugin to my project in main.cpp like

                  QString sDir = QCoreApplication::applicationDirPath();
                  app.addLibraryPath(sDir+"/plugins");

                  and all base directory of plugin to the resource directory.

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    raaghuu
                    wrote on last edited by
                    #13

                    Hey, i checked the folder mentioned... gif, jpeg, ico and many other plugins are present, but (strangely) png is missing; and even stranger is that png is the only format working for me!?!? O.o

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

                      You should have folder imageformats from posted location in current application's folder (i.e. without 'plugins' as parent folder) without
                      @QString sDir = QCoreApplication::applicationDirPath(); app.addLibraryPath(sDir+”/plugins”);@

                      1 Reply Last reply
                      0
                      • K Offline
                        K Offline
                        KA51O
                        wrote on last edited by
                        #15

                        When your testing your application on your development PC the plugins are present (because you have you Qt SDK). When you deploy your application at a customer PC they probably won't have the Qt SDK installed so you need to provide all the dlls your application requires (e.g. QtGui.dll, QtCore.dll.. AND the image plugins). The image plugins need to be present in the following way: YourProgramsInstallationFolder/plugins/imageformats/qjpeg.dll .....

                        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