Results 1 to 4 of 4

Thread: Release build fails to find some resource images

  1. #1
    Join Date
    Mar 2007
    Posts
    74
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Release build fails to find some resource images

    I cannot figure this out.

    I am using a .qrc file to hold my various images.
    I have a class that implements an imageviewer which displays an image.

    QImage image(":/deviceName");
    if (image.isNull())
    ...

    deviceName is an alias for the actual filename.

    This works fine under the debugger.
    It works fine as a Release build in it's own directory with just the necessary DLL's etc.

    If I try it on another machine, it fails to display the image.
    I am using the same directory and files that work on my other machine.
    The images subdirectory is present and contains all of the files.

    Furthermore I have some icons that use QPixmap and pull images from the resource file
    and those work.

    This is under windows.

    Mark

  2. #2
    Join Date
    Apr 2007
    Posts
    44
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: Release build fails to find some resource images

    Have you forgot to add init rc progma?
    here

    Q_INIT_RESOURCE(appname)
    before line that resource are using.

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

  4. #4
    Join Date
    Mar 2007
    Posts
    74
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Release build fails to find some resource images(solved)

    Thank you. The problem was not including the imageformats directory as part of my app.

Similar Threads

  1. Client/Server Error: BadIDChoice
    By 3nc31 in forum Qt Programming
    Replies: 5
    Last Post: 27th November 2007, 10:22

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.