def hidePassword(self): font = QFont('Helvetica', 10, weight=QFont.Bold) font.setLetterSpacing(QFont.PercentageSpacing, 110) self.stopTimer() self.passLabel.setText('* ' * 5) self.passLabel.setFont(font) self.passLabel.disableEdit() self.showButton.show() self.timerProgress.hide()
def showPassword(self): font = QFont('Helvetica', 13, weight=QFont.Bold) font.setLetterSpacing(QFont.PercentageSpacing, 110) self.passLabel.setText(self.getValue()) self.passLabel.setFont(font) self.passLabel.enableEdit() self.showButton.hide() self.timerProgress.show() self.timerEnd = time.time() + 15 if not self.timer: self.timerProgress.setValue(100) self.timer = QTimer() self.timer.timeout.connect(self.updateProgress) self.timer.start(100)