PDA

View Full Version : Qt application icon looks fine on Windows Vista and 7, but not visible in Windows XP



yo8saw
9th July 2010, 21:45
Hello!

I know there have been questions related to setting application icon, but I couldn't find a solution to my problem.

I use Qt 4.6.3 on Windows 7 x64 to develop a small application for windows.

I have


RC_FILE = myapp.rc


in my .pro file, and


IDI_ICON1 ICON DISCARDABLE "myappicon.ico"

1 VERSIONINFO
FILEVERSION 1,0,1,0
PRODUCTVERSION 1,0,1,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", "My Company\0"
VALUE "FileDescription", "A simple desktop application.\0"
VALUE "FileVersion", "1.0.1\0"
VALUE "LegalCopyright", "Copyright 2010 My Company\0"
VALUE "ProductName", "MyApp\0"
VALUE "ProductVersion", "1.0.1\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END


in myapp.rc.

Everything works just fine on both Windows 7 and Windows Vista. The file information (product name, copyright etc.) and the .exe icon appear as I've set them. The problem is on Windows XP, where the .exe icon does not appear in Explorer, although the other information (product name, copyright) is ok. The application works fine, otherwise.

Any insight would be greatly appreciated.

yo8saw
11th July 2010, 15:55
Any thoughts?

ChrisW67
12th July 2010, 03:07
You possibly have only the Vista/Win 7 256x256 PNG image in the ICO file and not the smaller, old-style images.

yo8saw
12th July 2010, 07:25
Chris, you were right. It would seem that I didn't pay enough attention when I created the .ico file, and it only contained the 256x256 pixels image. I recreated the .ico, adding all other available image sizes, and it now seems to work as expected on both windows 7 and XP.

Thanks, your help is much appreciated!