(self, QShowEvent)
return super().showEvent(QShowEvent)
override to change font size when subtitle is cutted
override to change font size when subtitle is cutted
override to change font size when subtitle is cutted
def showEvent(self, QShowEvent):
        """ override to change font size when subtitle is cutted
        """
        if len(self._sub_title.text()) * self._char_width > (
                self._sub_title.width() - 155):
            font = QFont('OpenSans', 14, QFont.Bold)
            font.setPixelSize(20)
            self._sub_title.setFont(font)
        return super().showEvent(QShowEvent)
def showEvent ( self , QShowEvent ) : if len ( self . _sub_title . text ( ) ) * self . _char_width > ( self . _sub_title . width ( ) - 155 ) : font = QFont ( 'OpenSans' , 14 , QFont . Bold ) font . setPixelSize ( 20 ) self . _sub_title . setFont ( font ) return super ( ) . showEvent ( QShowEvent )