-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAboutDialog.cpp
More file actions
48 lines (41 loc) · 1.41 KB
/
AboutDialog.cpp
File metadata and controls
48 lines (41 loc) · 1.41 KB
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
47
48
#include "AboutDialog.h"
#include "Version.h"
#include "ui_AboutDialog.h"
AboutDialog::AboutDialog(QWidget *parent)
: QWidget(parent)
, ui(new Ui::AboutDialog)
{
ui->setupUi(this);
setupUi();
}
AboutDialog::~AboutDialog()
{
delete ui;
}
void AboutDialog::setupUi()
{
setAttribute(Qt::WA_TranslucentBackground, false);
setWindowFlags(Qt::FramelessWindowHint | Qt::SubWindow | Qt::WindowStaysOnTopHint
| Qt::X11BypassWindowManagerHint);
ui->pushButtonClose->setFixedWidth(42);
ui->widgetDlgHead->setFixedHeight(40);
ui->pushButtonClose->setIcon(QIcon(":/image/close.png"));
ui->labelLogo->setStyleSheet("image: url(:/image/log0.ico);");
ui->labelName->setStyleSheet("color:#326cf3; font-size: 30px;");
ui->label_Version->setStyleSheet("color:#326cf3; ");
ui->labelRight->setStyleSheet("color:#bdbdbd; ");
ui->labelMIT->setStyleSheet("color:#bdbdbd; ");
ui->labelWWW->setStyleSheet("color:#bdbdbd; ");
ui->pushButtonPlaceholder->setEnabled(false);
ui->pushButtonPlaceholder->setFixedHeight(20);
setFixedSize(550, 300);
ui->labelName->setText(QString(APP_NAME) + " V" + APP_VERSION);
connect(ui->pushButtonClose, &QPushButton::clicked, this, [this]() { close(); });
}
void AboutDialog::changeEvent(QEvent *event)
{
if (event->type() == QEvent::LanguageChange) {
ui->retranslateUi(this);
}
QWidget::changeEvent(event);
}