Qt在Windows下无Dos黑窗口运行cmd指令Windows下Qt无Dos黑窗口运行cmd指令
Windows下Qt无Dos黑窗口运行cmd指令亲测有效通过WinExec()函数,设置SW_HIDE参数,可以控制Qt中调用WinExec运行cmd指令时,程序不弹出cmd运行时的Dos黑窗//头文件#include <windows.h>#include <winbase.h>#include <QCoreApplication> /** 以杀死进程为例*/ qint64 pid = QCoreApplica