I'm writing a utility that accepts a secondary shell command as its final parameter. My utility then runs the supplied shell command on behalf of the user. The user will invoke it as follows:
util [options] command with args
I want QCommandLineParser to parse the initial options, then leave the tail-end stuff alone (or parse it into a pure value list). Instead, QCommandLineParser complains that the user has entered invalid arguments.
For example, if the user were to enter
util -r ls -l
then ls -l
is a valid command that I want to accept but Qt tells the user that -l
is an invalid argument for my application. What's the best way to deal with this?