Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Cannot set the application icon

Cannot set the application icon

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    noastick
    wrote on last edited by
    #1

    Hello.
    I come here with, what seems like, a simple problem. I want to set the applicacion icon (not window icon) so that the .exe has an icon in the windows explorer. I read "here":http://doc.qt.io/qt-5/appicon.html how to do it, but none of both versions are working.

    V1:
    @RC_ICONS = myappico.ico@
    This one does not even compile. It seems Qt does not recognize RC_ICONS as it is not highlighted in purple. (I have Qt 5). When compiling I get
    @[release/projectname_resource_res.o]Error 1@

    V2:
    @IDI_ICON1 ICON DISCARDABLE "myappico.ico"@
    This one does compile, but the .exe lacks the icon.

    The icon is in .ico format and is in the same folder as the project.

    Thanks!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Can you show the exact error you are getting ?

      What size/resolution are you using for your ico file ?

      Which version of Windows are you running on ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on last edited by
        #3

        You need to both:

        • create an .rc file (looking like your #2)
        • reference this rc file from your .pro file like this: @win32:RC_FILE = myapp.rc@
        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved