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. Release dont show jpeg-Images
Forum Updated to NodeBB v4.3 + New Features

Release dont show jpeg-Images

Scheduled Pinned Locked Moved Installation and Deployment
9 Posts 3 Posters 3.3k 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.
  • K Offline
    K Offline
    kursukani
    wrote on last edited by
    #1

    Hello guys,

    i have a little problem with my projekt.
    If i compile it into a release project, it dont shows any jpeg-images anymore.
    I used Google but.. all solution dont works for me. Maybe im just a little bit stupid, but I hope you can help with this "little problem". :(

    Code for images:
    @
    palette->setBrush(QPalette::Background,(new QBrush((new QPixmap(":/data/imageIntro.jpeg")))));
    @
    and
    @
    QPixmap preview = QPixmap(":/data/preview.jpeg","JPEG");
    @

    My directory:
    @
    /MyApp/MyApp.exe
    /MyApp/data.qrc
    /MyApp/Qt5Core.dll
    /MyApp/Qt5Widgets.dll
    /MyApp/allotherneededDLL
    /MyApp/platforms/qwindows.dll
    /MyApp/imageformats/qjpeg.dll
    @

    My .pro-File:
    @
    QT += core gui

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = MyApp
    TEMPLATE = app

    SOURCES += main.cpp
    mainwindow.cpp

    HEADERS += mainwindow.h

    FORMS += mainwindow.ui

    RESOURCES +=
    data.qrc

    VERSION = 1.0.0
    (...)
    

    @

    My Qt-Version:
    @
    Qt 5.2 MSVC10 32Bit
    @

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      The directory structure you should have is described in "the Windows deployment guide":http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html

      At first sight, you should only need to move the imageformats folder in plugins

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kursukani
        wrote on last edited by
        #3

        Sorry for this. I tried and its still not working. :(
        Do you need more information?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Did you move imageformats in plugins or just qjpeg.dll ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kursukani
            wrote on last edited by
            #5

            Hi,

            jepp, I move imageformats to plugins.

            Its looks like:

            @
            /MyApp/MyApp.exe
            /MyApp/data.qrc
            /MyApp/Qt5Core.dll
            /MyApp/Qt5Widgets.dll
            /MyApp/allotherneededDLL
            /MyApp/platforms/qwindows.dll
            /MyApp/plugins/imageformats/qjpeg.dll
            @

            But its still not works. Im sure there is a simple solution for this. Do you need more information? What should I do? I created the release folder many times, and put the .exe in the new folder. Same problem. Only on debug-mode the images are show.

            Its the better solution to use the path to the images instead of .qrc-File?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              The qrc file is not needed, it's used to build your resources in your executable.

              Does it show the image properly if you run the release build from Qt Creator ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • JKSHJ Offline
                JKSHJ Offline
                JKSH
                Moderators
                wrote on last edited by
                #7

                Hi,

                Use /MyApp/imageformats/ instead of /MyApp/plugins/imageformats/

                See http://stackoverflow.com/questions/19710879/visual-studio-qt5-plugins-not-working-on-release/19761382#19761382

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @ JKSH If I saw the first post correctly, it's what kursukani was doing

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • JKSHJ Offline
                    JKSHJ Offline
                    JKSH
                    Moderators
                    wrote on last edited by
                    #9

                    [quote author="SGaist" date="1387921977"]@_JKSH_ If I saw the first post correctly, it's what kursukani was doing[/quote]Whoops, I missed that!

                    The original folder layout is correct.

                    [quote author="kursukani" date="1387829578"]Only on debug-mode the images are show.[/quote]Can you please confirm that you have deployed the correct DLL?

                    • qjpegd.dll is for Debug mode
                    • qjpeg.dll is for Release mode

                    [quote author="kursukani" date="1387829578"]Its the better solution to use the path to the images instead of .qrc-File?[/quote]They are both supposed to be equally valid solutions. However, you can give it a try and see if it makes a difference.

                    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                    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