PDA

View Full Version : QProcess() to execute independent processes in c++ [linux]



shhtk
18th May 2011, 12:02
Greetings,

Am new to C++, Linux and Qt. I would like to execute a # of executable programs independently within my source code. I want to be able to monitor/control these processes by fetching PID, knowing process status, killing process and if the process executed successfully.

I was considering system calls because they aren't safe, but I switched to fork()-exec() but now I stumbled on QProcess and it made me to change my mind. so what do you think? :confused:

Also, I searched for QProcess examples but I didn't find any to assist me in understanding.

Therefore, advice me upon this issue. Please!

Thank you in advance!

mcosta
18th May 2011, 17:18
Am new to C++, Linux and Qt.


Hi, this is a big problem: Qt is a C++ Toolkit; so you MUST know C++ to use it.

QProcess allows you to do all what you want but you have to understand how it works. To do this you need to know about signal/slot mechanism.

I suggest you to study about C++, then move to study Qt and try to apply your knowledge.