<QMessageBox> Proxy Page

Macros

QT_REQUIRE_VERSION(int argc, char **argv, const char *version)

Macro Documentation

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").

Example:

#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();
}

© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.