-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbar_ui.cpp
More file actions
44 lines (39 loc) · 862 Bytes
/
bar_ui.cpp
File metadata and controls
44 lines (39 loc) · 862 Bytes
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
36
37
38
39
40
41
42
43
44
#include "bar_ui.h"
#include "ui_bar_ui.h"
bar_ui::bar_ui(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::bar_ui)
{
ui->setupUi(this);
ui->progressBar->setRange(0,100);
ui->pushButton->hide();
static int count = 0;
mTimer = new QTimer(this);
//cm = new ChiLeMe;
connect(mTimer, &QTimer::timeout, this, [=]()
{
ui->progressBar->setValue(count);
count++;
if(count>ui->progressBar->maximum())
{
mTimer->stop();
count = 0;
time_out = 1;
ui->pushButton->show();
ChiLeMe* ch = new ChiLeMe;
ch->show();
hide();
}
});
mTimer->start(30);
}
bar_ui::~bar_ui()
{
delete ui;
}
void bar_ui::on_pushButton_clicked()
{
ChiLeMe* ch = new ChiLeMe;
ch->show();
hide();
}