-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscore.cpp
39 lines (31 loc) · 990 Bytes
/
score.cpp
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
#include "score.h"
Score::Score(QWidget *parent) : QFrame(parent)
{
setFixedSize(250, 250);
//setStyleSheet("border-radius: 50px; background-color: gray;");
//setStyleSheet("border-radius: 50px;");
//setStyleSheet("background: transparent;"); // toto nastaví pozadí úplně průhledné
setStyleSheet("font-weight: bold;\
font-family: palatino;\
font-size: 40px;\
");
QVBoxLayout *l = new QVBoxLayout;
setLayout(l);
_scoreLabel = new QLabel("<center>SCORE</center><center>0</center>", this);
l->setAlignment(_scoreLabel, Qt::AlignHCenter);
l->addWidget(_scoreLabel);
setAttribute(Qt::WA_TranslucentBackground, true);
hide();
}
void Score::paintEvent(QPaintEvent *event)
{
/*
QColor backgroundColor = palette().light().color();
backgroundColor.setAlpha(150);
QPainter customPainter(this);
customPainter.fillRect(rect(), backgroundColor);
*/
}
void Score::changeScore(int score)
{
}