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. JPEG Support
QtWS25 Last Chance

JPEG Support

Scheduled Pinned Locked Moved Installation and Deployment
6 Posts 4 Posters 7.5k 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.
  • J Offline
    J Offline
    JoeBoggs
    wrote on 24 Sept 2010, 16:24 last edited by
    #1

    I know this has been asked a thousand times, but none of the solutions have worked for me. I am creating a very simple web-view gui app. It compiles just fine, but there is no jpeg support when i deploy the app to any other computer other than mine.

    What I have tried:
    compiling QT statically (after 4 days of compiling errors, this is probably not going to work for me)

    Copying the plugin directly into the release version of the App (I would love to do this, but I am not quite getting it right). Here is my .pro contents:

    @
    QT += core gui
    QT += webkit

    TARGET = browser3
    TEMPLATE = app

    SOURCES += main.cpp
    mainwindow.cpp

    HEADERS += mainwindow.h

    FORMS += mainwindow.ui

    win32:RC_FILE = MyApplication.rc

    QT_PLUGIN_PATH = plugins
    @

    I then put the qjpeg4.dll file into the plugins folder. This is probably really stupid for obvious reasons which are unknown to me.

    I have been trying to get my simple QT app to work for 5 days. If someone can solve this relatively easy problem, I will forever be in your debt. Although beggars shouldn't demand anything, if you are kind enough to answer with some possible solution, please provide as much detail as possible. I am a noob, so please assume I know nothing. Thanks so much!

    1 Reply Last reply
    0
    • L Offline
      L Offline
      luca
      wrote on 24 Sept 2010, 16:35 last edited by
      #2

      Try to put in your .pro

      @
      QTPLUGIN += qjpeg
      @

      and in your main.cpp :

      @
      #include <QtPlugin>
      Q_IMPORT_PLUGIN(qjpeg);

      int main(int argc, char *argv[])
      {
      ...
      ...
      }
      @

      1 Reply Last reply
      0
      • J Offline
        J Offline
        JoeBoggs
        wrote on 24 Sept 2010, 16:44 last edited by
        #3

        First, thanks for the speedy response! Second, I had tried that earlier, but kept getting errors like cannot find -lqjpegd. However, I figured it out!

        Although I had tried putting the plugin directly into myapp/plugins/imageformats/qjpeg4.dll, and I had tried myapp/qjpeg4.dll, I had not tried myapp/imageformats/qjpeg4.dll. So, although it appears that the plugin path in my project file is completely ignored - I really don't care, as long as it works. Documentation on this, however, would have been invaluable as I lost 4 days of work before stumbling across this solution (by trial and error). Again, plugin worked for me when i did this:

        myapp/imageformats/qjpeg4.dll

        Wow.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          claudio.donofrio
          wrote on 11 Mar 2011, 10:22 last edited by
          #4

          Hi guys
          I don't know whats going wrong but I've just tried to run a small image browser app on Windows 7 SP1 32bit. This app worked fine for the last couple of month. Now my app can't load jpgeg images anymore. I do have myapp/imageformats/qjpeg4.dll. I've even tried to register the dll, but that gives me an error "The module failed to load". Loading PNG images still works flawlessly......

          1 Reply Last reply
          0
          • A Offline
            A Offline
            andre
            wrote on 11 Mar 2011, 10:31 last edited by
            #5

            Did you, by any chance, change something in your compilation environment? New Qt version? Using release instead of debug? Changed compiler? All those need to match between the libs, your application and your plugins.

            1 Reply Last reply
            0
            • C Offline
              C Offline
              claudio.donofrio
              wrote on 11 Mar 2011, 10:41 last edited by
              #6

              I will have to check the consistency of workflow, but I just copied the application folder as is (previously working fine) and again; the same app works fine with PNG images.

              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