Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, July 2007
Re: "New Problem Started" - Problem in Building Stand alone Exe for Windows


Message 1 in thread


Note: forwarded message attached.
       
---------------------------------
Moody friends. Drama queens. Your life? Nope! - their life, your story.
 Play Sims Stories at Yahoo! Games. 
--- Begin Message ---
Hi
    The code started working after making the change as suggested but now the problem is that it is taking .jpeg and .jpg on the systems where QT is NOT installed, whereas the same exe is not taking images on the systems where QT is installed. 
   
   THIS PROBLM IS WHEN TRYING TO LOAD IMAGE IN THE RUNNING (loaded) EXE (like selecting some image and then displaying it in a label from the exe). It takes the images (.jpeg and .png) which are given to be loaded in the exe at its compile time.
   
   Also the code has now stopped taking .png files when loaded at run time!!
  
I am writting the code that I added - 
   
  In "Main.cpp" ->
   
  #include <QtPlugin>
Q_IMPORT_PLUGIN(qjpeg)
Q_IMPORT_PLUGIN(qgif)
   
  In ".pro" file
   
  QTPLUGIN += qjpeg qgif qmng 
   
  And in "Makefile.Debug" ->
   
  QMAKE_LFLAGS += -L$$[QT_INSTALL_PLUGINS]/imageformats
   
   
  Can anybody Please help me out what wrong I m doing now ???
   
  Regards,
  @Ritzz
   
  
Raja Raja <lallu1901@xxxxxxxxx> wrote:
    Hey Dear
   
      Thanks a Lot ... It worked .. Thanks again :)
   
  @Ritzz

Ivan Kharin <korsar.akvis@xxxxxxxxx> wrote:
  > I havent used Q_IMPORT_PLUGIN() and the application builded is
> static in nature - I mean to say that the application is running
> fine on PC where QT is not installed. The only problem is that it i not taking .Jpeg images.
> I even included "#include " in my code this time
> and then again rebuilded but to no use.

Add to any .cpp:

#include 
Q_IMPORT_PLUGIN(qjpeg)

add to .pro:

QTPLUGIN += qjpeg


qmake, nmake, test.

-- 
 [ signature omitted ]