You are not logged in.

1

Wednesday, June 22nd 2011, 7:45am

QProcess is not executing

Dear All,

Am a newbie in Qt and C++, I have to execute couple of processes and moitor their health.Therefore am interested in
1. Starting a new process
2. get pid
3. Know the process state

So far am trying to run an example in QProcess class reference, but unluckily my analogclock doesn't run, I have no idea why! Am sure am missing someting
Please advice, thanx!

Source code

1
2
3
4
5
6
7
QObject *parent; 
QStringList arguments; 
QString path = "./usr/lib/qt4/examples/widgets/analogclock"; 
arguments << "-style" << "motif"; 
QProcess *proc = new QProcess(parent); 
proc->execute(path, arguments); 
proc->pid();



2

Wednesday, June 22nd 2011, 8:48am

I found out the problem, I should removed the dot from "./path", ignore my question! it works :D