From a8a866b6265106d2c3a6f957fe8ee0744a9e7618 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Thu, 1 Aug 2024 13:24:09 +0200 Subject: [PATCH] QCommandlineParser doc: Mention QT_COMMAND_LINE_PARSER_NO_GUI_MESSAGE_BOXES Pick-to: 6.7 6.5 Change-Id: I2c3dd6000a29e23f256480076f4f832765af08c9 Reviewed-by: Leena Miettinen Reviewed-by: Karsten Heimrich (cherry picked from commit 119e7a3038e282c18ec79c87c07884036ca3362b) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/tools/qcommandlineparser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/corelib/tools/qcommandlineparser.cpp b/src/corelib/tools/qcommandlineparser.cpp index 2880eedf77a..863cf0ca6ce 100644 --- a/src/corelib/tools/qcommandlineparser.cpp +++ b/src/corelib/tools/qcommandlineparser.cpp @@ -196,7 +196,8 @@ QStringList QCommandLineParserPrivate::aliases(const QString &optionName) const since the output is either discarded or not accessible. On Windows, QCommandLineParser uses message boxes to display usage information - and errors if no console window can be obtained. + and errors if no console window can be obtained. These message boxes can be omitted by setting + the \c QT_COMMAND_LINE_PARSER_NO_GUI_MESSAGE_BOXES environment variable. For other platforms, it is recommended to display help texts and error messages using a QMessageBox. To preserve the formatting of the help text, rich text