Results 1 to 8 of 8

Thread: Relase build has no images (PNG) yet Debug does

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2006
    Location
    Madison, WI USA
    Posts
    153
    Thanks
    35
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Question Relase build has no images (PNG) yet Debug does

    Windows XP SP3
    Visual Studio 2005
    Qt 4.6.2 (same problem with 4.5.2)

    I build my program in both Debug and Release modes. In the debugger I can see all my icons but running the Release version - no icons (png, jpg, svg). I'm using the Qt resource compiler for my images (this should embed the images into the executable corrrect?).

    I thought maybe I needed the '/imageformats' directory but this made no difference (even after adding 'QCoreApplication::addLibraryPath("Z:/MyAppDir/imageformats");' to my QMainWindow constructor).

    I add icons using 'const QString' or explicit strings like:
    Qt Code:
    1. setWindowIcon( QIcon( ":/images/monkey_on_128x128.png" ) );
    To copy to clipboard, switch view to plain text mode 
    In the resouces.qrc file this image is listed as:
    Qt Code:
    1. <file>../images/monkey_on_128x128.png</file>
    To copy to clipboard, switch view to plain text mode 
    I've tried running the executable from the Release directory and the project root directory but, alas, no images appear. I have also created the icon and dump the result (null or not) to my log file. The images never report that they are null.

    I went through the forum but saw nothing about this particular situation. Does anyone have any suggestions for me to try?
    Last edited by mclark; 18th May 2010 at 22:57. Reason: Changed title

Similar Threads

  1. Qt + Linux + Eclipse - debug using debug build?
    By will49 in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2012, 06:27
  2. DEBUG macro not defined in debug build using vc++
    By piotr.dobrogost in forum Qt Programming
    Replies: 0
    Last Post: 21st July 2009, 13:07
  3. Replies: 3
    Last Post: 28th December 2007, 11:02
  4. Replies: 2
    Last Post: 8th November 2007, 20:15
  5. How to build in debug mode?
    By Weilor in forum Newbie
    Replies: 5
    Last Post: 15th February 2006, 14:02

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
  •  
Qt is a trademark of The Qt Company.