[問題] 程式運行完之後自己關掉自己
開發平台(Platform): (Ex: Win10, Linux, ...)
VS2015
編譯器(Ex: GCC, clang, VC++...)+目標環境(跟開發平台不同的話需列出)
QT
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
問題(Question):
我做了一版下載檔案(按下BUTTON時會自己下載 解壓縮)
想讓他解壓縮完之後自己關掉
目前是把關掉程式寫在 on_btnDownload_clicked() 裡面
但發現這樣寫應用程式會關閉不完全...
請問我應該怎樣在程式做完步驟之後把自己關掉呢
#include "myclass.h"
using namespace std;
MyClass::MyClass(QWidget *parent)
: QMainWindow(parent)
{
ui.setupUi(this);
manager = new QNetworkAccessManager(this);
QObject::connect(manager, SIGNAL(finished(QNetworkReply*)), this,
SLOT(finishedSlot(QNetworkReply*)));
}
void MyClass::on_btnDownload_clicked()
{
下載的code...
解壓縮的code...
this -> close();
}
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.25.219.95
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1477065864.A.55A.html
→
10/22 01:18, , 1F
10/22 01:18, 1F
→
10/22 01:18, , 2F
10/22 01:18, 2F
→
10/22 01:18, , 3F
10/22 01:18, 3F
推
10/22 06:34, , 4F
10/22 06:34, 4F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章