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 Updated to NodeBB v4.3 + New Features

QT 6.3 cmake adding icons OSX

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 435 Views 2 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.
  • Z Offline
    Z Offline
    ziggx
    wrote on 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

    VRoninV artwawA 2 Replies Last reply
    0
    • Z ziggx

      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

      VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on 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

        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

        artwawA Offline
        artwawA Offline
        artwaw
        wrote on 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 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

          • Login

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