Obtaining command line arguments in a Qt application

后端 未结 3 2027
甜味超标
甜味超标 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:39

    If you are writing a Console only application then you might want to consider using QCoreApplication instead of QApplicition. QCoreApplication is part of QtCore while QApplication is defined in QtGui, so you get an extra and unnecessary dependency.

提交回复
热议问题