Calculadora: criando um botão com QPushButton no PySide6

This commit is contained in:
Luiz Otávio
2023-03-01 08:29:06 -03:00
parent e7684cc5ad
commit a36cdb069f
3 changed files with 25 additions and 3 deletions

View File

@@ -0,0 +1,15 @@
from PySide6.QtWidgets import QPushButton
from variables import MEDIUM_FONT_SIZE
class Button(QPushButton):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.configStyle()
def configStyle(self):
font = self.font()
font.setPixelSize(MEDIUM_FONT_SIZE)
self.setFont(font)
self.setMinimumSize(75, 75)
self.setProperty('cssClass', 'specialButton')