Results 1 to 5 of 5

Thread: How to deploy the imageviewer example in windows?

  1. #1
    Join Date
    Mar 2010
    Posts
    3
    Qt products
    Qt4

    Default How to deploy the imageviewer example in windows?

    I am new to QT and trying to play with the examples first. I am able to run the Imageviewer example on my windows and can view any image files. The example is here: http://qt.nokia.com/doc/4.6/widgets-imageviewer.html

    Then, I try to deploy a release to another windows machine without QT installed. I included MINGWM10.DLL LIBGCC_S_DW2-1.DLL QTCORE4.DLL QTGUI4.DLL in the same folder of the imageviewer.exe. The program starts ok. But I cannot open any image file. It just says " cannot load xxx.jpg"

    What will be the problem? Do I need to include any DLL files for jpeg library? Which DLL should I include?

    Thanks

  2. #2
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to deploy the imageviewer example in windows?

    Quote Originally Posted by fork View Post
    I am new to QT and trying to play with the examples first. I am able to run the Imageviewer example on my windows and can view any image files. The example is here: http://qt.nokia.com/doc/4.6/widgets-imageviewer.html

    Then, I try to deploy a release to another windows machine without QT installed. I included MINGWM10.DLL LIBGCC_S_DW2-1.DLL QTCORE4.DLL QTGUI4.DLL in the same folder of the imageviewer.exe. The program starts ok. But I cannot open any image file. It just says " cannot load xxx.jpg"

    What will be the problem? Do I need to include any DLL files for jpeg library? Which DLL should I include?

    Thanks
    Additionally you need to deply a image format dll alongwith. You can find them in \qt\plugins\imageformats\*

  3. #3
    Join Date
    Mar 2010
    Posts
    3
    Qt products
    Qt4

    Default Re: How to deploy the imageviewer example in windows?

    thanks yogeshgokul.
    I just tried. I put all dll files I found in the \qt\plugins\imageformats\ in the same directory of the exe file. It still does not work.
    Is loading plugins different from loading libraries?

  4. #4
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to deploy the imageviewer example in windows?

    Quote Originally Posted by fork View Post
    thanks yogeshgokul.
    I just tried. I put all dll files I found in the \qt\plugins\imageformats\ in the same directory of the exe file. It still does not work.
    Is loading plugins different from loading libraries?
    You need to call a function.
    Qt Code:
    1. QApplication app(...);
    2. app.addLibraryPath(app.applicationDirPath());
    To copy to clipboard, switch view to plain text mode 

  5. #5
    Join Date
    Mar 2010
    Posts
    3
    Qt products
    Qt4

    Default Re: How to deploy the imageviewer example in windows?

    I finally got it working. I put all image related DLL files in imageformats/ folder.

Similar Threads

  1. Compile and deploy to Windows CE
    By Luc4 in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 16th February 2010, 02:42
  2. Deploy on Windows XP ?
    By Anti in forum Newbie
    Replies: 3
    Last Post: 24th September 2009, 21:19
  3. Program in Windows, Deploy in Linux
    By suitto in forum Installation and Deployment
    Replies: 1
    Last Post: 8th April 2009, 13:11
  4. Storage and View -> imageViewer
    By C167 in forum Qt Programming
    Replies: 15
    Last Post: 22nd January 2008, 14:43
  5. How to deploy Qt-dlls for windows
    By niko in forum Installation and Deployment
    Replies: 5
    Last Post: 18th March 2007, 18:11

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.