Mac application menu title [Solved]



  • It seems, according to various sources, that the application menu title can be changed by specifying an appropriate TARGET variable value in your .pro file. However, this doesn't work in my case. Im specifying both TARGET and DEPLOYMENT.display_name values. I have set QApplication::name.

    My app bundle has the correct name. The "About" menu is correctly deducting the application name as well.

    Is this a bug, or am I missing something? I'm using Qt 5.1.

    Edit: I should mention that this is happening when I launch my application from Qt Creator.


  • Lifetime Qt Champion

    Hi,

    Could you post a pro file example that shows the behavior ?



  • Hi, thanks for your answer. I couldn't reproduce the problem in a new test project.

    tl;dr: CFBundleExecutable key in Info.plist dictates the application name.

    A bit of fiddling led me to my custom Info.plist file, where the only occurrance of the initial application name was in the "CFBundleExecutable" key - I did an initial search for the string, but Qt Creator was not looking in .plist files. Removing/renaming that key/value pair, the intended application title showed up!

    The executable name (apart from the bundle name) seems to be getting the same name as the TARGET .pro variable, which makes sense, I guess.

    Thanks for tickling me to take a thorough approach ;-)


  • Lifetime Qt Champion

    You're welcome :-)

    Indeed the executable name comes from TARGET. IIRC you can modify CFBundleName in your Info.plist to change what is shown in the menu.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.