Calculadora: criando um QLabel para mostrar informações

This commit is contained in:
Luiz Otávio
2023-02-28 08:03:36 -03:00
parent edc2cb9805
commit 1ef098a9f7
2 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
from PySide6.QtCore import Qt
from PySide6.QtWidgets import QLabel, QWidget
from variables import SMALL_FONT_SIZE
class Info(QLabel):
def __init__(self, text: str, parent: QWidget | None = None) -> None:
super().__init__(text, parent)
self.configStyle()
def configStyle(self):
self.setStyleSheet(f'font-size: {SMALL_FONT_SIZE}px;')
self.setAlignment(Qt.AlignmentFlag.AlignRight)