QT/C++ on MAC - How do I hide my dock icon?

后端 未结 1 709
温柔的废话
温柔的废话 2021-01-05 11:33

I\'d like my dock icon to be hidden and the app to be represented as a menu bearing icon on the menu bar (right hand side).

1条回答
  •  不思量自难忘°
    2021-01-05 11:55

    This will hide the icon:

    http://www.macosxtips.co.uk/index_files/disable-the-dock-icon-for-any-application.html

    Summarizing the URL, in the dict xml element inside Info.plist in the app, add the lines:

    LSUIElement
    1
    

    You need to use the appropriate OS APIs to add the menu.

    0 讨论(0)
提交回复
热议问题