-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTeamNumber.py
31 lines (27 loc) · 1002 Bytes
/
TeamNumber.py
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
from PyQt6.QtCore import Qt
from PyQt6.QtGui import QFont
from PyQt6.QtWidgets import QLabel, QVBoxLayout, QHBoxLayout
class TeamNumber(QLabel):
def __init__(self):
super().__init__()
self.setFixedSize(200, 120)
self.setStyleSheet("""
background-color: #000;
color: white;
font-weight: bold;
padding: 5px;
border-radius: 10px;
border: 2px solid rgba(250, 154, 74, 0.8);
""")
self.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.label = QLabel()
self.label.setAlignment(Qt.AlignmentFlag.AlignCenter)
# Get the current font
font = self.font()
# Set the font size
font.setPointSize(22)
# Set the new font
self.setFont(font)
self.setText(f"Takım Numarası")
def update_tnumber(self, data):
self.setText(f"Takım Numarası\n{data}")