-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhalldlg.cpp
More file actions
36 lines (32 loc) · 759 Bytes
/
halldlg.cpp
File metadata and controls
36 lines (32 loc) · 759 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
#include "halldlg.h"
#include "ui_halldlg.h"
#include "qwebviewcustom.h"
HallDlg::HallDlg(QWidget *parent) :
QDialog(parent),
ui(new Ui::HallDlg)
{
ui->setupUi(this);
QWebViewCustom* web = (QWebViewCustom*)ui->widgetWeb;
web->load(QUrl("http://www.baidu.com/"));
web->SetOpenUrlSlot(false);
connect(web, SIGNAL(linkClicked(QUrl)),this,SLOT(openUrlSlot(QUrl)));
setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
showFullScreen();
}
HallDlg::~HallDlg()
{
delete ui;
}
void HallDlg::closeEvent(QCloseEvent *event)
{
Q_UNUSED(event);
}
void HallDlg::on_pushButton_close_clicked()
{
close();
}
void HallDlg::openUrlSlot(QUrl url)
{
QWebViewCustom* web = (QWebViewCustom*)ui->widgetWeb;
web->load(url);
}