[Interest] Is it possible to translate the command line help&version description

hualet mr.asianwang at gmail.com
Sat Mar 14 02:33:38 CET 2015


I’ve tried installing a translator, it did work either, maybe it just loaded the wrong translation files. The second method is really straight forward, thanks Koehne ;)


hualet @ Deepin Inc.
mr.asianwang at gmail.com




> 在 2015年3月14日,上午5:19,Koehne Kai <Kai.Koehne at theqtcompany.com> 写道:
> 
> >Like what I've asked in the title, is it possible?
> >I've tried calling setDescription on the CommandLineOption returned by >addHelpOption,
> >but with no luck. I need some help here, thanks.
> 
> I understand you want to translate the "Displays this help." text?
> 
> The text is translated via tr() , so if you have installed the right Qt translation files & installed a translator it probably should also be translated ...
> 
> Anyway, what you should also be able to do is just adding your own help option, with your own description, and call QCommandLineParser::showHelp() if it is triggered.
> 
> Regards
> 
> Kai

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150314/29ba3451/attachment.html>


More information about the Interest mailing list