View Full Version : How to set the application name using pro file
live_07
9th November 2007, 21:02
Hi All,
I m using qt 4.3.2 on Windowsxp.
If any Body knows how to set the application name and organiztion name then plz tell me the procedure.
jpn
9th November 2007, 21:20
Hi
There is no way to directly set them in .pro file if you're talking about QCoreApplication::applicationName() (http://doc.trolltech.com/4.3/qcoreapplication.html#applicationName-prop) and QCoreApplication::organizationName() (http://doc.trolltech.com/4.3/qcoreapplication.html#organizationName-prop).
If you're talking about binary name, use TARGET (http://doc.trolltech.com/4.3/qmake-variable-reference.html#target) variable.
Edit: Of course, you can use compiler defines in .pro:
DEFINES += APPLICATION_NAME=\\\"appname\\\"
DEFINES += ORGANIZATION_NAME=\\\"appname\\\"
But you will still have to apply them in code:
QCoreApplication::setApplicationName(APPLICATION_N AME);
QCoreApplication::setOrganizationName(ORGANIZATION _NAME);
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.