Hello!
My pro-file consist a string:
VERSION=1.0
How can I get the version, wich I wrote in pro-file?
Hello!
My pro-file consist a string:
VERSION=1.0
How can I get the version, wich I wrote in pro-file?
maiby QSettings can help you, but i'm not sure
a life without programming is like an empty bottle
QSettings does not consist information about version
so use QFile and take it manually
a life without programming is like an empty bottle
This method is not correct. Is there any functions to get the version number?
It is from qmake manual:Originally Posted by Opilki_Inside
VERSION - The version number of the target library, for example, 2.3.1.
So what? I need to get this VERSION from source code of my application...Originally Posted by Mad Max
This template exist for UNIX libraries only (for formation of a name of the library file, such as libmy.so.1.1.0 ). If you wish to have the version of your app then keep it in a code as a constant.Originally Posted by Opilki_Inside
So provide some method to get it For example look for 'static const char *version="1.0";' in your code. Use grep or whatever tool you like.Originally Posted by Opilki_Inside
If this is using windows, then qmake/make creates standard windows VS_VERSION_INFO resource information for your application. This can be accessed via the win32 function GetFileVersionInfo().Originally Posted by Opilki_Inside
Obviously this is not platform independant. Unfortunately i don't know how this is handled on other platforms.
Smudge.
I somehow accidentally came across to a solution like this:
DEFINES += MYAPP_VERSION=0x000501"Qt Code:
.arg(MYAPP_VERSION & 0xFF0000) .arg(MYAPP_VERSION & 0x00FF00) .arg(MYAPP_VERSION & 0x0000FF); // "0.5.1"To copy to clipboard, switch view to plain text mode
J-P Nurmi
Bookmarks