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. QT 6.3 cmake adding icons OSX
Forum Update on Monday, May 27th 2025

QT 6.3 cmake adding icons OSX

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 429 Views
  • 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.
  • Z Offline
    Z Offline
    ziggx
    wrote on 9 Nov 2021, 17:23 last edited by
    #1

    Hi there,

    I'm having problems trying to figure out how to add icons to my app. The help files are very confusing - can some one point me in the right direction?

    Thanks in advance
    Best wishes
    Ziggx

    V A 2 Replies Last reply 9 Nov 2021, 17:32
    0
    • Z ziggx
      9 Nov 2021, 17:23

      Hi there,

      I'm having problems trying to figure out how to add icons to my app. The help files are very confusing - can some one point me in the right direction?

      Thanks in advance
      Best wishes
      Ziggx

      V Offline
      V Offline
      VRonin
      wrote on 9 Nov 2021, 17:32 last edited by
      #2

      @ziggx said in QT 6.3 cmake adding icons OSX:

      add icons to my app.

      Define what icons you mean. Do you refer to this?

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      1
      • Z ziggx
        9 Nov 2021, 17:23

        Hi there,

        I'm having problems trying to figure out how to add icons to my app. The help files are very confusing - can some one point me in the right direction?

        Thanks in advance
        Best wishes
        Ziggx

        A Offline
        A Offline
        artwaw
        wrote on 9 Nov 2021, 18:52 last edited by
        #3

        @ziggx I second VRonin. Elaborate please.

        For more information please re-read.

        Kind Regards,
        Artur

        1 Reply Last reply
        0
        • Z Offline
          Z Offline
          ziggx
          wrote on 13 Nov 2021, 12:20 last edited by
          #4

          Hi everyone,

          CMake help files can be a bit obscure - however, I sorted it out. I think a bit more in integrating cmake with QT Creator would help.

          Anyway, for anyone else trying to add icns to QT with OSX, you need to add these lines before "find package" (substitute your icns file and names as appropriate):

          set(MACOSX_BUNDLE_ICON_FILE Stubtiler.icns)
          set(Stubtiler_ICON "${CMAKE_CURRENT_SOURCE_DIR}/Stubtiler.icns")
          set_source_files_properties(${Stubtiler_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")

          Then in:

          if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
          qt_add_executable(StubTiler
          MANUAL_FINALIZATION
          StubResources.qrc # add resources files
          ${Stubtiler_ICON} # add icns here
          ${PROJECT_SOURCES}
          )

          Hope this helps anyone else facing the same problem

          Ziggx

          1 Reply Last reply
          1

          1/4

          9 Nov 2021, 17:23

          • Login

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