启动登录线程 :param cls: :param account: 账号 :param password: 密码
(cls, account, password, parent=None)
| 51 | |
| 52 | @classmethod |
| 53 | def start(cls, account, password, parent=None): |
| 54 | """启动登录线程 |
| 55 | :param cls: |
| 56 | :param account: 账号 |
| 57 | :param password: 密码 |
| 58 | """ |
| 59 | cls._thread = QThread(parent) |
| 60 | cls._worker = LoginThread(account, password) |
| 61 | cls._worker.moveToThread(cls._thread) |
| 62 | cls._thread.started.connect(cls._worker.run) |
| 63 | cls._thread.finished.connect(cls._worker.deleteLater) |
| 64 | cls._thread.start() |
| 65 | AppLog.info('login thread started') |
| 66 | |
| 67 | def get_avatar(self, uid, avatar_url): |
| 68 | try: |