Example #1
0
    def __init__(self, num):
        super().__init__()
        QRadioButton.__init__(self)

        self.font2 = QFont()
        self.font2.setFamily("Helvetica")
        self.font2.setPointSize(20)
        self.font2.setBold(True)

        self.keyName = num
        self.setFont(self.font2)
        self.setStyleSheet('color:white')
        self.toggled['bool'].connect(self.setColor)
Example #2
0
 def __init__(self, text, func: callable):
     QRadioButton.__init__(self, text)
     # noinspection PyUnresolvedReferences
     self.toggled.connect(func)