MCPcopy Create free account
hub / github.com/PyQt5/PyQtClient / initAccount

Method initAccount

Widgets/Dialogs/LoginDialog.py:49–62  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

47 QTimer.singleShot(100, self.initAccount)
48
49 def initAccount(self):
50 # 自动填充账号密码
51 self._accounts = Setting.value('accounts', {}, QVariant)
52 completer = QCompleter(self._accounts.keys(), self.lineEditAccount)
53 completer.setCaseSensitivity(Qt.CaseInsensitive)
54 # 在内部自动填充完成
55 completer.setCompletionMode(QCompleter.InlineCompletion)
56 # 设置objectName用于设置样式
57 # completer.popup().setObjectName('lineEditAccountAuto')
58 self.lineEditAccount.setCompleter(completer)
59
60 # 读取储存的账号密码
61 account = Setting.value('account', '', str)
62 self.lineEditAccount.setText(account)
63
64 def on_lineEditAccount_textChanged(self, account):
65 """输入框编辑完成信号,寻找头像文件是否存在

Callers

nothing calls this directly

Calls 2

setTextMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected