Internal Qt4 Standards for Command Line Arguments
I'm trying to write a command line parser for use with Qt4 applications. Qt4's internal system matters because it seems QApplicatioin can recognize certain options. As far as I can tell, the standard is as follows:
-this-is-a-switch
-this-is-a-parameter value
-this-is-also-a-parameter=value
Is there official documentation on this subject somewhere? Can anyone comment on the above speculation?
Re: Internal Qt4 Standards for Command Line Arguments
The already supported command line options are documented in the API docs of QApplication. There is no public usable interface for parsing command line options but you should use QStringList QCoreApplication::arguments () for implementing your own parser because it has already all arguments removed that Qt interprets itself.
Re: Internal Qt4 Standards for Command Line Arguments
Is there any reason why this parser should inherit QObject?
Re: Internal Qt4 Standards for Command Line Arguments
No, I see no reason why this should be necessary.