How Can I Pass an argument value to an external program In Qt
-
Hello, I have a question.
I use this code in qt
QProcess *process = new Qprocess;
QString filePath = QDir::homePatg()+"someThing.exe";
process->start(filePath);So, How can i Pass an argument value to an external program?
I am waiting your command. Please help me.
-
Hi @seokwon,
How can i Pass an argument value to an external program?
You can pass command line arguments as the second parameter to the QProcess::start() method.
For example:
QStringList args; args << "arg1" << "arg2"; process->start(filePath, arg);
Cheers.
-
Hello, I have a question.
I use this code in qt
QProcess *process = new Qprocess;
QString filePath = QDir::homePatg()+"someThing.exe";
process->start(filePath);So, How can i Pass an argument value to an external program?
I am waiting your command. Please help me.
@seokwon QProcess documentation (http://doc.qt.io/qt-5/qprocess.html) shows how to do this. Did you read it?
-
Hi @seokwon,
How can i Pass an argument value to an external program?
You can pass command line arguments as the second parameter to the QProcess::start() method.
For example:
QStringList args; args << "arg1" << "arg2"; process->start(filePath, arg);
Cheers.