def __init__(self): font = QFont() font.setPointSize(8) font.setFamily("Calibri") self.setFont(font) self._hover = False self._glow_index = 0 self._anim_timer = QTimer() self._anim_timer.timeout.connect(self._animate_glow)
def __init__(self, *args, **kwargs): super(LineNumbers, self).__init__(*args) self.textWidget = self.doc = None self.setTextWidget(kwargs.pop('widget', None)) # Monospaced font to keep width from shifting. font = QFont() font.setStyleHint(QFont.Courier) font.setFamily("Monospace") self.setFont(font) self.updateAndResize()