Do I get a finished slot if I start QProcess using startDetached

后端 未结 1 2047
粉色の甜心
粉色の甜心 2020-12-04 02:08

Do I get a finished signal if I start a QProcess using startDetached()? I\'m trying to start a process, but I need to be able to get an event when the process has terminated

相关标签:
1条回答
  • 2020-12-04 02:31

    No you can't get a signal when you use startDetached because you have no object.

    startDetached is a static function and when you call it the process is started directly without creating a QProcess object. Therefore, even if there was a signal you would not be able to connect it to anything since you have no object to connect from.

    If you want a signal you should create a QProcess object and then call start on it. You will then be able to get the finished signal when the process finishes.

    0 讨论(0)
提交回复
热议问题