Page 2 of 2 FirstFirst 12
Results 21 to 22 of 22

Thread: Image resources (png, ico) not rendering in app

  1. #21
    Join Date
    Aug 2010
    Posts
    99
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Image resources (png, ico) not rendering in app

    Quote Originally Posted by d_stranz View Post
    Maybe you need to reinstall the Qt VS Add-in?
    Perhaps. Or perhaps I just configured it to use a different directory because I didn't want my project littered with generated files and directories (Visual Studio already adds "Debug", "Release", "ipch", and a bunch of files).

    I know "qrc_<projectname>.cpp" exists in the "Debug" directory, and it definitely contains the image data (as byte arrays). But it's not showing in the "GeneratedFiles" directory in Visual Studio. So it mustn't be getting compiled with the rest of the .cpp files.

    It's been a while since I last worked on this project, but I remember I used to have to manually add moc and ui files to Visual Studio because I didn't have the add-in to handle all that stuff (I had Visual Studio Express, which can't run add-ins). I later got the add-in, but I can't remember if or how it's supposed to manage all the auto-generated files.

  2. #22
    Join Date
    Aug 2010
    Posts
    99
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Image resources (png, ico) not rendering in app

    Yeah, that did it. Once I added the "qrc_<projectname>.cpp" to GeneratedFiles, it got picked up by the build and now the images are showing correctly.

Similar Threads

  1. Replies: 4
    Last Post: 28th April 2014, 13:01
  2. load image from resources in library
    By stevocz in forum Newbie
    Replies: 0
    Last Post: 11th July 2013, 10:21
  3. Replies: 5
    Last Post: 10th October 2012, 22:05
  4. Replies: 2
    Last Post: 14th January 2012, 23:39
  5. Speeding up Image Rendering
    By reno77 in forum Newbie
    Replies: 2
    Last Post: 15th June 2010, 10:58

Tags for this Thread

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.