-
Notifications
You must be signed in to change notification settings - Fork 1
/
cumw.cpp
35 lines (31 loc) · 910 Bytes
/
cumw.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "cumw.h"
#include "ui_cumw.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
cumw w;
w.show();
return a.exec();
}
cumw::cumw(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::cumw)
{
ui->setupUi(this);
}
cumw::~cumw()
{
delete ui;
}
void cumw::on_pushButton_clicked()
{
QElapsedTimer timer;
timer.start();
qNamThread clt;
connect(&clt,SIGNAL(Update(int)),ui->progressBar,SLOT(setValue(int)));
connect(&clt,SIGNAL(UpdateWait(QString,int)),this,SLOT(WaitMessage(QString,int)));
connect(ui->pushButton_2,SIGNAL(pressed()),&clt,SLOT(emitCancel()));
bool state=clt.DownloadFile("https://mirror2.internetdownloadmanager.com/idman638build22.exe?b=1&filename=idman638build22.exe","IDM_TRAIL.EXE");
qDebug() <<"state"<<state<<clt.timeConversion(timer.elapsed());
}