Given that VERSION is defined like so, is there some way to expand that #define within the text area of a QMessageBox::about() along with other text?
#define VERSION_MAJOR 0
#define VERSION_MINOR 1
#define VERSION_MICRO 0
#define VERSION_SPECIAL ".alpha-1"
#define STRINGIFY0(s) # s
#define STRINGIFY(s) STRINGIFY0(s)
#define VERSION STRINGIFY(VERSION_MAJOR) "." STRINGIFY(VERSION_MINOR) "." STRINGIFY(VERSION_MICRO) "" VERSION_SPECIAL
tr("<center><small>VERSION</small></center>"
"<p>Copyright (c) 2015, Bla Bla Bla...</p>"));
#define VERSION_MAJOR 0
#define VERSION_MINOR 1
#define VERSION_MICRO 0
#define VERSION_SPECIAL ".alpha-1"
#define STRINGIFY0(s) # s
#define STRINGIFY(s) STRINGIFY0(s)
#define VERSION STRINGIFY(VERSION_MAJOR) "." STRINGIFY(VERSION_MINOR) "." STRINGIFY(VERSION_MICRO) "" VERSION_SPECIAL
QMessageBox::about(this, tr("About Menu"),
tr("<center><small>VERSION</small></center>"
"<p>Copyright (c) 2015, Bla Bla Bla...</p>"));
To copy to clipboard, switch view to plain text mode
Bookmarks