Important: Please read the Qt Code of Conduct -

Starting process detached exit upon parent exit

  • `hello guys, this is my code to start a detached process. However, i found that the processes close when the parent application is closed. Am i doing something wrong? The main app is a console application and the child apps are guis.

                        QProcess *abc = new QProcess(nullptr);
                        bool t=abc->startDetached(FileName);
                        qDebug() << "detacted = " << t;

  • Lifetime Qt Champion


    What version of Qt ?
    What OS ?
    What application ?
    Do you realize you are leaking QProcess objects ?

  • in addition to SGaist question, what happens if you try some of the other startDetached overloaded methods?

Log in to reply