Hello everyone,
I’m trying to run a command from inside Qt. I would like to do it like fire and forget, meaning i don’t need the program to wait for my process to stop, before continuing. In essence, the openoffice.org process I start applies a macro on a document used as template.
In essence this code work perfectly in a bash shell:
openoffice.org3 “macro:///Standard.Module1.findandreplace” template.doc
or as
openoffice.org3 template.doc “macro:///Standard.Module1.findandreplace”
The trouble is that when trying to do the same from inside the Qt program (as explained in QProcess help page) it’s not the same success.
...
QString parameter="template.doc"
...
QString program = "openoffice.org3 "; // tried also with QString program = "/usr/bin/openoffice.org3 "; same results
QStringList arguments;
arguments <<parameter<<" \"macro:///Standard.Module1.findandreplace\" ";
QProcess *myProcess = new QProcess();// tried also with ... new QProcess(this);
myProcess->start(program, arguments);
...
Any ideas on this?; From what i understood, all you have to do is prepare the args list for the program, which in this case is the macro and the template file.
I get no error.
Thank you,
↧