Problem about argument of console app
Solved
General and Desktop
-
wrote on 1 Oct 2018, 09:44 last edited by
parser.parse(appArgs); const QStringList args = parser.positionalArguments();
input:
./app arg1 -a opt1 => args = arg1, opt1
./app arg -a opt1 arg1 => args = opt1, arg1but I need: args only has the argument without the value of the option.
-
wrote on 1 Oct 2018, 09:47 last edited by VRonin 10 Jan 2018, 09:48
Can you show what you set up with
QCommandLineParser::addOptions
/QCommandLineParser::addPositionalArgument
? -
wrote on 1 Oct 2018, 10:31 last edited by aha_1980 10 Jan 2018, 10:48
I setup addOptions and addPositionArgument after.
Thanks so much!
1/3