Qt Target with special characters

孤者浪人 提交于 2020-01-03 05:10:22

问题


I have a QT application and right know I need to change the app name to something like "A&B".

I have tried to change the TARGET in my .pro file, but I am having problems with the "&" character in macOS.

I have also tried to use qmake functions like val_escape, system_quote, shell_quote but nothing worked for me.

As a last resource, I have tried to change the CFBundleName in my .plist file, which worked for app menus and etc, but not for the app name (still having problems with &, as make is considering the app to be called B.app instead of A&B.app

Do you know any other way to get this problem fixed? Is there even a way to have a macOS application with a name like A&B.app?

Thanks in advance


回答1:


I dont think you are following the right approach. What the client want is perhaps change the "user visible" strings for the application name to "A&B" - for that you need to check out the following functions in QCoreApplication:

applicationName : QString
applicationVersion : QString
organizationDomain : QString



回答2:


I fixed this by adding a DisplayName to my configuration and changing the applicationDisplayName in the Info.plist. Thanks anyway.



来源:https://stackoverflow.com/questions/50109920/qt-target-with-special-characters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!