2018-12-08 22:21:12 +00:00
|
|
|
#include "Process.h"
|
2020-04-22 10:56:45 +01:00
|
|
|
#include <qstringlist.h>
|
|
|
|
#include <qvariant.h>
|
|
|
|
class QObject;
|
2018-12-08 22:21:12 +00:00
|
|
|
|
|
|
|
Process::Process(QObject* parent)
|
|
|
|
: QProcess(parent)
|
|
|
|
{}
|
|
|
|
|
|
|
|
void
|
|
|
|
Process::start(const QString& program, const QVariantList& arguments)
|
|
|
|
{
|
|
|
|
QStringList args;
|
|
|
|
|
|
|
|
for (int i = 0; i < arguments.length(); i++)
|
|
|
|
args << arguments[i].toString();
|
|
|
|
|
|
|
|
QProcess::start(program, args);
|
|
|
|
}
|
|
|
|
|
|
|
|
QString
|
|
|
|
Process::getOutput()
|
|
|
|
{
|
|
|
|
return QProcess::readAllStandardOutput();
|
|
|
|
}
|