Get ready slot if I start QProcess using startDetached

Get ready signal if I start QProcess with startDetached ()? I am trying to start a process, but I need to get an event when the process has finished.

+6
c ++ qt qprocess
source share
1 answer

No, you cannot receive a signal when you use startDetached because you do not have an object.

startDetached is a static function, and when you call it, the process starts directly without creating a QProcess object. Therefore, even if there is a signal, you cannot connect it to anything, since you do not have an object to connect.

If you need a signal, you must create a QProcess object and then run it. After the process is complete, you will receive a ready signal.

+4
source share

All Articles