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. Set Mac Native Menus at Runtime
Forum Update on Monday, May 27th 2025

Set Mac Native Menus at Runtime

Scheduled Pinned Locked Moved Solved General and Desktop
osxmacmenuruntime
4 Posts 2 Posters 1.8k 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.
  • M Offline
    M Offline
    maximo
    wrote on 7 Nov 2015, 17:19 last edited by
    #1

    Is there a way to set the native menus on Mac OSX at runtime without having to change the TARGET variable in the .pro file?

    See, I may need to whitelabel my project multiple times, and it would be great to simply copy in a new settings.ini file rather than have to edit that variable and recompile again.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 7 Nov 2015, 21:47 last edited by
      #2

      Hi,

      You would have to provide your own .plist file and customize the CFBundleName value.

      Hope it helps

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

      M 1 Reply Last reply 7 Nov 2015, 23:27
      1
      • S SGaist
        7 Nov 2015, 21:47

        Hi,

        You would have to provide your own .plist file and customize the CFBundleName value.

        Hope it helps

        M Offline
        M Offline
        maximo
        wrote on 7 Nov 2015, 23:27 last edited by
        #3

        @SGaist Is there any way to intercept the menu paint event and swap out "app" with some other phrase? (Note, I have TARGET variable set to "app", currently.)

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 7 Nov 2015, 23:30 last edited by
          #4

          No, that's the native OS X menu so you can't modify it. Again: use the Info.plist file, it's also explained in QMenuBar's documentation

          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
          1

          2/4

          7 Nov 2015, 21:47

          • Login

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