53 int main(
int argc,
char **argv)
59 bool verbose =
parser.isSet(
"verbose");
68 parser.addOption(verboseOption);
70 bool verbose =
parser.isSet(verboseOption);
104 parser.addPositionalArgument(
"command",
"The command to execute.");
111 if (command ==
"resize") {
112 parser.clearPositionalArguments();
113 parser.addPositionalArgument(
"resize",
"Resize the object to a new size.",
"resize [resize_options]");
The QCommandLineOption class defines a possible command-line option. \inmodule QtCore.
The QCommandLineParser class provides a means for handling the command line options.
The QCoreApplication class provides an event loop for Qt applications without UI.
static QString translate(const char *context, const char *key, const char *disambiguation=nullptr, int n=-1)
static QStringList arguments()
The QString class provides a Unicode character string.
The QStringList class provides a list of strings.
QApplication app(argc, argv)
[0]