- Qt 6.5
- Qt Widgets
- <QMessageBox> Proxy Page
- Qt 6.5.2 Reference Documentation

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