主动宣告setProcessState(QProcess::NotRunning) 或者在堆上new一个QProcess. 出处: https://stackoverflow.com/questions/33874243/qprocessstartdetached-but-hide-console-window I had exactly the same problem, and could not solve it in a clean way. I have found 2…
From Qt 5.10 on, there is a new way how to start detached processes with QProcess. Of course you know this, but let me quickly repeat what a detached process is. If you start a program using QProcesswithout detaching, then the destructor of QProcess …