parser->addOption(QCommandLineOption("verbose", "Enable verbose output"));
parser->addOption(QCommandLineOption("input", "Input file path", "file"));
QCommandLineOption thresholdOption(QStringList() << "t" << "threshold", "Threshold value", "value", "10"); parser->addOption(thresholdOption);This option is called "threshold" and takes a numerical value as an argument. If the value is not specified on the command line, it defaults to 10. The QCommandLineParser package library is part of the Qt framework.