问题描述
我正在寻找一个命令行解析器为Qt4。
我做了一个小的google搜索,发现这个:但是它缺少对--enable-foo和--disable-foo的支持开关。
似乎Frologic删除了这个。所以我看到的最好的选择是使用Boost(这不是API或ABI稳定)或分叉支持kdelibs。 Yay ...
自从Qt 5.2,你终于可以在QtCore本身找到一个解决方案:我贡献了。
I am looking for a command line parser for Qt4.
I did a small google search, and found this: http://www.froglogic.com/pg?id=PublicationsFreeware&category=getopt however it lacks support for "--enable-foo" and "--disable-foo" switches. Besides that, it looks like a real winner.
EDIT:
It seems Frologic removed this. So the best options I see are using Boost (which is not API nor ABI stable) or forking the support for kdelibs. Yay...
Since Qt 5.2 you can finally find a solution in QtCore itself: I contributed QCommandLineParser there.
这篇关于Qt4的命令行解析器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!