How to run a system command in Qt?

前端 未结 2 1685
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-24 01:50

I have to run a system command in Qt. but I have to give an argument for that command.

for example opening gedit with a text file. like \"gedit /home/oDx/Documents/

2条回答
  •  心在旅途
    2020-12-24 02:20

    QProcess::execute() may be helpful:

    QProcess::execute("gedit /home/oDx/Documents/a.txt"));
    

提交回复
热议问题