導航:首頁 > 編程語言 > qt關閉應用程序

qt關閉應用程序

發布時間:2023-09-14 08:46:14

A. QT 啟動與關閉外部程序

啟動

QString filepath = QDir::currentPath();

    QString fullpath = filepath+"\\pp\\dist\\start";

    QString title = fullpath+"\\main.exe";

    title = title.replace("/","\\");

    fullpath = fullpath.replace("/","\\");

   襪答 QProcess p(this);

    p.setWorkingDirectory(fullpath);

    p.start("cmd", QStringList()<<"/c"<<"start main.exe");

    p.waitForStarted();

    p.waitForFinished();

關閉

    QProcess p(this);

    p.setWorkingDirectory(fullpath);

   慶洞 p.start("告差慧cmd", QStringList()<<"/c"<<"taskkill /f /t /im main.exe");

    p.waitForStarted();

    p.waitForFinished();

閱讀全文

與qt關閉應用程序相關的資料

熱點內容
linux目錄中創建文件夾許可權設置密碼 瀏覽:759
word文檔正式文件模版 瀏覽:247
linux文件系統的類型是 瀏覽:111
蘋果的無線傳輸文件找不到了 瀏覽:102
密件文件名能出現在通知嗎 瀏覽:832
編寫一個web應用程序 瀏覽:350
哪些場所網路好 瀏覽:171
華為手機怎麼找到以前安裝過的app 瀏覽:100
49塊一單約人陪的app是什麼 瀏覽:570
ug文件格式圖片 瀏覽:24
興趣班編程課是學什麼 瀏覽:879
怎麼才能加微信醫葯群 瀏覽:601
微信表情小蘿莉親吻 瀏覽:876
我國應如何做好互聯網網路空間的治理工作 瀏覽:777
今日最新聞投票app 瀏覽:53
aecs6卸載工具 瀏覽:645
視頻文件包含的信息 瀏覽:238
湖北可編程晶振參數有哪些 瀏覽:485
在美國買蘋果7那個版本的 瀏覽:557
網路營銷文檔 瀏覽:204

友情鏈接