-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwidget.cpp
More file actions
46 lines (35 loc) · 814 Bytes
/
Copy pathwidget.cpp
File metadata and controls
46 lines (35 loc) · 814 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
45
46
#include "widget.h"
#include "ui_widget.h"
#include"timedialog.h"
#include"setting.h"
Widget::Widget(QWidget *parent)
: QWidget(parent)
, ui(new Ui::Widget)
{
ui->setupUi(this);
ui->setting->setIcon(QIcon(":/photos/setting.jpg"));
ui->setting->setIconSize(QSize(50,50));
ui->home->setIcon(QIcon(":/photos/home.jpg"));
ui->home->setIconSize(QSize(50,50));
}
Widget::~Widget()
{
delete ui;
}
void Widget::on_setting_clicked()
{
}
void Widget::on_home_clicked()
{
this->close();
setting *set = new setting;
set->show();
}
void Widget::on_open_clicked()
{
this->hide();
TimeDialog dlg(this); // 栈上对象
dlg.setModal(true); // 模态
dlg.exec(); // 阻塞
this->show();
}