Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Set app icon using qmake (Both mac and Win)
Forum Updated to NodeBB v4.3 + New Features

Set app icon using qmake (Both mac and Win)

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
3 Posts 3 Posters 1.2k Views 3 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.
  • ademmlerA Offline
    ademmlerA Offline
    ademmler
    wrote on last edited by
    #1

    I am following this qt documentation to set my application icons for mac and Win.
    https://doc.qt.io/qt-5/appicon.html

    In my *.pro file I have

    win32: {
        RC_ICONS = my.ico
    ...
    

    This option is not recognized at all and stays "black colored" ...

    macx {  
        ICON = my.icns
    ....
    

    This throughs an error at compile time:
    error: No rule to make target spicon.icns, needed by My.app/Contents/Resources/spicon.icns'. Stop.

    Can somebody lead me to working examples pls.

    S J.HilkJ 2 Replies Last reply
    0
    • ademmlerA ademmler

      I am following this qt documentation to set my application icons for mac and Win.
      https://doc.qt.io/qt-5/appicon.html

      In my *.pro file I have

      win32: {
          RC_ICONS = my.ico
      ...
      

      This option is not recognized at all and stays "black colored" ...

      macx {  
          ICON = my.icns
      ....
      

      This throughs an error at compile time:
      error: No rule to make target spicon.icns, needed by My.app/Contents/Resources/spicon.icns'. Stop.

      Can somebody lead me to working examples pls.

      S Offline
      S Offline
      SimonSchroeder
      wrote on last edited by
      #2

      @ademmler This both looks perfectly fine and is the same way we are doing it. You are right that for RC_ICONS there seems to be no highlighting. It is black in our project file as well, but it works. On MacOS it seems that it cannot find the icons. Do you have an icon with this name? Especially a Mac icon with the ending .icns? Furthermore, if the icon is located inside a subfolder, you have to specify the relative path to it (relative to the project file). This is true for both Windows and Mac.

      1 Reply Last reply
      0
      • ademmlerA ademmler

        I am following this qt documentation to set my application icons for mac and Win.
        https://doc.qt.io/qt-5/appicon.html

        In my *.pro file I have

        win32: {
            RC_ICONS = my.ico
        ...
        

        This option is not recognized at all and stays "black colored" ...

        macx {  
            ICON = my.icns
        ....
        

        This throughs an error at compile time:
        error: No rule to make target spicon.icns, needed by My.app/Contents/Resources/spicon.icns'. Stop.

        Can somebody lead me to working examples pls.

        J.HilkJ Offline
        J.HilkJ Offline
        J.Hilk
        Moderators
        wrote on last edited by Christian Ehrlicher
        #3

        @ademmler

        win32: {
        RC_ICONS = my.ico
        ...
        This option is not recognized at all and stays "black colored" ...

        remove the : behind the win32, remove the space before the {
        qmake is kind of fragile to these kind of things

        error: No rule to make target spicon.icns, needed by My.app/Contents/Resources/spicon.icns'. Stop.

        the error message doesn't fit to your code posted:
        my.icns != spicon.icns


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        1 Reply Last reply
        2

        • Login

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