How to get executable name in Qt

后端 未结 3 581
星月不相逢
星月不相逢 2021-02-06 22:02

I run a Qt application, what I want to know is this running binary file name.

3条回答
  •  心在旅途
    2021-02-06 22:32

    The Qapplication parses the commandline arguemnts, the first entry is the name of the executable - this is roughly the same as argv[0] in standard C but has a few extra complexities on windows if you have a Unicode build or if the application is started as a service

    See http://doc.qt.io/qt-5/qcoreapplication.html#arguments

提交回复
热议问题