PDA

View Full Version : qprocess



d4rc
30th June 2010, 09:29
I need execute a comand to console(Linux), example mkdir. how I do this comand? when I paste comand in console this run.

i have this:

comand = new QString("comand");
process = new QProcess(this);
parameter = new QStringList;
parameter->append("");


process->start(*comand,*parameter);

Zlatomir
30th June 2010, 10:06
Edited --- i said something stupid :o sorry

tbscope
30th June 2010, 11:11
This should be very basic since the documentation is very clear:



QProcess mkdirProcess;

QString program = "mkdir";
QStringList arguments;
arguments << "/path/to/new/dir";

mkdirProcess.start(program, arguments);