pyqt5 密码框
2020-03-16 python 1927
from PyQt5.QtWidgets import QLineEdit class Password(QLineEdit): value = [] def input(self, text): total = len(text) first = "" flag = 0 if total == 1 and text !="●": first = text flag = 1 v = text.replace("●", "") self.value += v if flag == 1: self.value[0] = first self.value = self.value[0:len(text)] self.setText("●" * len(text)) print("".join(self.value)) def getValue(self): return "".join(self.value)
很赞哦! (0)
相关文章
文章评论
-
-
-
0条评论