[Development] How to specify Windows Application Icon through qmake?

1+1=2 dbzhang800 at gmail.com
Thu Dec 20 17:02:21 CET 2012

Hi all,

At present, if we want to setting the Application Icon under Windows
platform, we should create a xxx.rc file first, then pass the file path to
qmake variable RC_FILE. see:


I hope that we can directly specify the Application Icon through one
variable. such as

    win32:ICON = myapp.ico


   RC_ICONS = myapp.ico myapp2.ico

But I don't know which one is better.

For method 1:

The ICON has been used to special Application Icon for Mac and Symbian in

mac: ICON = myapp.icns
symbian*:ICON = myapp.svg
IMO, it make sense to reuse this variable for Windows.

For method 2:

As there already exist two variable RC_LANG and RC_CODEPAGE which used to
generate the .rc file. so a new variable  RC_ICONS can be introduced to

 IDI_ICON1               ICON    DISCARDABLE     "myapp.ico"
 IDI_ICON2               ICON    DISCARDABLE     "myapp2.ico"

Any idea?

Best regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20121221/44dcac5d/attachment.html>

More information about the Development mailing list