Hello,
I couldn't find in the Qt help any class that encapsulates command line argument parsing (like getopt(3) or getopt_long(3).
Is there anything like this or I have to use one of the above methods?
THX for your help
Hello,
I couldn't find in the Qt help any class that encapsulates command line argument parsing (like getopt(3) or getopt_long(3).
Is there anything like this or I have to use one of the above methods?
THX for your help
I'd use something like:
http://api.kde.org/4.x-api/kdelibs-a...dLineArgs.html
or
http://code.google.com/p/qtargparser/
Note however that you should instantiate QApplication before attempting to parse any arguments, as stated in the documentation.
What exactly do you need?
If you just need a list of the arguments given to the application, QApplication::arguments() will give you a QStringList with all the arguments.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
There is one now. I wrote QCommandLineParser, which is in Qt 5.2.
Bookmarks