hi, im using QT4.5 in debian
i want to know , how to set version number for qt applications ?
Thnks
Bala
hi, im using QT4.5 in debian
i want to know , how to set version number for qt applications ?
Thnks
Bala
QCoreApplication class contains methods setApplicationName and setApplicationVersion but I think it is up to you to decide how to use those. I have used them every now and then for example to set dialog title to same as the application name and for that I have used applicationName-method.
Maybe you could choose from one of the following:
Define the version information within the application source code (string constant or preprocessor macro).
Use QCoreApplication : applicationVersion() and setApplicationVersion(const QString&version).
Define the version information in the .pro file using qmake macro VERSION.
Last edited by toutarrive; 12th March 2010 at 09:02.
If one uses the above method is there anyway of passing this to the application code at compilation stage? So for instance it is compiled as a variable into the code and can be used to display to the user the version number of the program.Define the version information in the .pro file using qmake macro VERSION.
Thanks,
Royce
Check out this link on the subject http://www.openguru.com/2009/11/qt-b...n-version.html
!sirius
Royceybaby (9th June 2010)
Brilliant link.
Thanks,
Royce
Indeed a briliant link. But I want to read the version number from a non-running executable on Linux.
Any ideas on how to fix this?
I'm a complete linux noob, so there might be something very simple I'm missing here.
0x2B || !0x2B // Hamlet
One way to do that would be to use a string that can be searched for in the executable. For example "$VERSION_TAG$1.04$". So then you can just open the executable file as binary data, search for the tag and read the text afterwards.
Bookmarks