Results 1 to 4 of 4

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

  1. #1
    Join Date
    Jul 2010
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Qt application icon looks fine on Windows Vista and 7, but not visible in Windows XP

    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

    Qt Code:
    1. RC_FILE = myapp.rc
    To copy to clipboard, switch view to plain text mode 


    in my .pro file, and

    Qt Code:
    1. IDI_ICON1 ICON DISCARDABLE "myappicon.ico"
    2.  
    3. 1 VERSIONINFO
    4. FILEVERSION 1,0,1,0
    5. PRODUCTVERSION 1,0,1,0
    6. BEGIN
    7. BLOCK "StringFileInfo"
    8. BEGIN
    9. BLOCK "040904E4"
    10. BEGIN
    11. VALUE "CompanyName", "My Company\0"
    12. VALUE "FileDescription", "A simple desktop application.\0"
    13. VALUE "FileVersion", "1.0.1\0"
    14. VALUE "LegalCopyright", "Copyright 2010 My Company\0"
    15. VALUE "ProductName", "MyApp\0"
    16. VALUE "ProductVersion", "1.0.1\0"
    17. END
    18. END
    19. BLOCK "VarFileInfo"
    20. BEGIN
    21. VALUE "Translation", 0x409, 1252
    22. END
    23. END
    To copy to clipboard, switch view to plain text mode 


    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.

  2. #2
    Join Date
    Jul 2010
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt application icon looks fine on Windows Vista and 7, but not visible in Windows

    Any thoughts?

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Qt application icon looks fine on Windows Vista and 7, but not visible in Windows

    You possibly have only the Vista/Win 7 256x256 PNG image in the ICO file and not the smaller, old-style images.

  4. The following user says thank you to ChrisW67 for this useful post:

    yo8saw (12th July 2010)

  5. #4
    Join Date
    Jul 2010
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt application icon looks fine on Windows Vista and 7, but not visible in Windows

    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!

Similar Threads

  1. Setting the Application Icon on Windows
    By Coises in forum Newbie
    Replies: 4
    Last Post: 12th June 2017, 21:41
  2. setting main application icon on windows
    By JeanC in forum Qt Programming
    Replies: 7
    Last Post: 12th June 2017, 06:35
  3. qmake problem with application icon in windows
    By dashesy in forum Qt Programming
    Replies: 4
    Last Post: 12th June 2017, 06:33
  4. QtSql and Windows Vista
    By imitrik in forum Qt Programming
    Replies: 1
    Last Post: 5th October 2007, 20:19
  5. Qt and windows vista
    By munna in forum General Discussion
    Replies: 8
    Last Post: 11th January 2006, 23:33

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.