Setting the Application Icon
-
Hi,
im trying to set an icon for my application.I tought i will simply create an icon, put it in my resources (qrc) and add RC_ICONS = myappico.ico in my .pro,
but the doc say :
However, if you already have an .rc file, for example, with the name myapp.rc, which you want to reuse, the following two steps will be required. First, put a single line of text to the myapp.rc file:i have a resources.rc + version.h files for version handling purposes,
//resources.rc looks like this, and i dont know where to add the line
IDI_ICON1 ICON "myappico.ico"
#include <windows.h> #include "version.h" VS_VERSION_INFO VERSIONINFO FILEVERSION VER_FILEVERSION PRODUCTVERSION VER_PRODUCTVERSION BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904E4" BEGIN VALUE "CompanyName", VER_COMPANYNAME_STR VALUE "FileDescription", VER_FILEDESCRIPTION_STR VALUE "FileVersion", VER_FILEVERSION_STR VALUE "InternalName", VER_INTERNALNAME_STR VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR VALUE "LegalTrademarks1", VER_LEGALTRADEMARKS1_STR VALUE "LegalTrademarks2", VER_LEGALTRADEMARKS2_STR VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR VALUE "ProductName", VER_PRODUCTNAME_STR VALUE "ProductVersion", VER_PRODUCTVERSION_STR END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1252 END END
-
Hi @LeLev,
Did you try to put your line at start of your existing rc file, after the includes ?
It is defined as this in the Qt example projects like Qt Win Extras - Quick Player example or Active Qt Wrapper example -
Hi @LeLev,
Did you try to put your line at start of your existing rc file, after the includes ?
It is defined as this in the Qt example projects like Qt Win Extras - Quick Player example or Active Qt Wrapper example -
-