mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
22 lines
555 B
Python
22 lines
555 B
Python
from PySide2.QtWidgets import QFrame, QLabel, QGridLayout
|
|
|
|
from game.infos.information import Information
|
|
|
|
|
|
class QInfoWidget(QFrame):
|
|
|
|
def __init__(self, info: Information):
|
|
super(QInfoWidget, self).__init__()
|
|
self.info = info
|
|
self.titleLabel = QLabel("<b>" + info.title + "</b>")
|
|
self.textLabel = QLabel(info.text)
|
|
self.init_ui()
|
|
|
|
def init_ui(self):
|
|
layout = QGridLayout()
|
|
layout.addWidget(self.titleLabel,0,0)
|
|
layout.addWidget(self.textLabel,1,0)
|
|
self.setLayout(layout)
|
|
|
|
|