Obtaining command line arguments in a Qt application

后端 未结 3 2029
甜味超标
甜味超标 2020-12-15 10:18

The following snippet is from a little app I wrote using the Qt framework. The idea is that the app can be run in batch mode (i.e. called by a script) or can be run interact

3条回答
  •  春和景丽
    2020-12-15 10:32

    Only in order to keep response up-to-date, Qt now provides a dedicated class for parsing command line:

    http://doc.qt.io/qt-5/qcommandlineparser.html

    P.S. : can only post this as response and not a comment; I'm sorry because the question was not really how to parse but how to access.

提交回复
热议问题