Results 1 to 2 of 2

Thread: Retina (@2x) icons are not being loaded from resource (.qrc)

  1. #1
    Join Date
    Feb 2013
    Posts
    8
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Unhappy Retina (@2x) icons are not being loaded from resource (.qrc)

    Hi, I have placed both the standard icon (app.png) and the retina one (app@2x.png) into a resource (.qrc).
    In designer I’ve chosen the app.png one, but it is not being changed automatically in retina display systems as expected.
    It have been working whereas I used images from folders, but now that I am trying to make my app more “portable” it stop working!.

    Any Idea??

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Retina (@2x) icons are not being loaded from resource (.qrc)

    Do you need to call Q_INIT_RESOURCE( <<your library name here>> ); somewhere in the code that loads your icons, before you try to load them?

    Are you sure you are specifying the URL of the png "file" in the resources correctly? (":/Resources/app.png") where you replace "Resources" with whatever prefix you are actually using in your qrc file?

Similar Threads

  1. Qt and retina display, Mac
    By ecspertiza in forum Qt Programming
    Replies: 1
    Last Post: 29th November 2012, 00:45
  2. Qt Creator on MacBook Pro Retina
    By Sanuden in forum Qt Tools
    Replies: 2
    Last Post: 23rd July 2012, 00:25
  3. How to load icons from resource file
    By joseph in forum Qt Programming
    Replies: 7
    Last Post: 25th June 2012, 07:00
  4. Replies: 3
    Last Post: 28th June 2011, 18:32
  5. Best practice naming convention for icons sets in resource file
    By stefanadelbert in forum Qt Programming
    Replies: 7
    Last Post: 27th May 2011, 02:54

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.