def ask_for_password(self, title, label="Password"):
if self._preset_password is not None:
return self._preset_password
input_dlg = QInputDialog(parent=self, flags=Qt.Dialog)
input_dlg.setTextEchoMode(QLineEdit.Password)
input_dlg.setWindowTitle(title)
input_dlg.setLabelText(label)
input_dlg.resize(500, 100)
input_dlg.exec()
return input_dlg.textValue()
评论列表
文章目录