QT_REQUIRE_VERSION (int argc , char ** argv , const char * version ) |
This macro can be used to ensure that the application is run with a recent enough version of Qt. This is especially useful if your application depends on a specific bug fix introduced in a bug-fix release (for example, 6.1.2).
The
argc
and
argv
parameters are the
main()
function's
argc
and
argv
parameters. The
version
parameter is a string literal that specifies which version of Qt the application requires (for example, "6.1.2").
范例:
#include <QApplication> #include <QMessageBox> int main(int argc, char *argv[]) { QT_REQUIRE_VERSION(argc, argv, "4.0.2") QApplication app(argc, argv); ... return app.exec(); }