forked from XMuli/ChineseChess
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAboutAuthor.cpp
More file actions
executable file
·35 lines (29 loc) · 899 Bytes
/
Copy pathAboutAuthor.cpp
File metadata and controls
executable file
·35 lines (29 loc) · 899 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
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2019-2024 XMuli & Contributors
// SPDX-GitHub: https://github.com/XMuli/ChineseChess
// SPDX-Author: XMuli <xmulitech@gmail.com>
#include "AboutAuthor.h"
#include "ui_AboutAuthor.h"
#include <QIcon>
#include <QPainter>
#include <QPalette>
AboutAuthor::AboutAuthor(QWidget *parent) :
QDialog(parent),
ui(new Ui::AboutAuthor)
{
this->setWindowIcon(QIcon(":/images/chess.svg"));
ui->setupUi(this);
QPalette pl = ui->textBrowser->palette();
pl.setBrush(QPalette::Base,QBrush(QColor(255,0,0,0)));
ui->textBrowser->setPalette(pl);
}
AboutAuthor::~AboutAuthor()
{
delete ui;
}
void AboutAuthor::paintEvent(QPaintEvent *event)
{
QPainter painter(this);
painter.drawPixmap(rect(), QPixmap(":/images/background.jpg"));
QDialog::paintEvent(event);
}