scoreboard_ui.py 688 Bytes
Newer Older
Tom Pillot's avatar
Tom Pillot committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from PyQt5 import QtWidgets as qtw
from PyQt5 import QtCore as qtc
from PyQt5 import QtGui as qtg


class ScoreWindowUi(qtw.QMainWindow):
    def __init__(self):
        super().__init__()

        self.setWindowTitle("Scores")
        widget = qtw.QWidget(self)
        self.setCentralWidget(widget)

        self.list_widget = qtw.QListWidget()
        self.timer_label = qtw.QLabel()
        self.timer_label.setFont(qtg.QFont("Arial", 80, qtg.QFont.Bold))

        self.timer = qtc.QTimer(self)

        vlayout = qtw.QVBoxLayout()
        vlayout.addWidget(self.timer_label, alignment=qtc.Qt.AlignCenter)
        vlayout.addWidget(self.list_widget)
        widget.setLayout(vlayout)