How to get executable name in Qt

后端 未结 3 614
星月不相逢
星月不相逢 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:40

    Again not really a Qt question. To find the name of the binary file executed it would be something like.

    #include 
    using namespace std;
    int main(int argc, char **argv)
    {
      cout << argv[0] << endl;
      return 0;
    }
    

提交回复
热议问题