当前位置:优学网  >  在线题库

使用PyQt6运行异步任务

发表时间:2022-07-23 00:01:52 阅读:77

我在网上搜索时发现了以下解决方案:https://www.pythonfixing.com/2021/12/fixed-how-use-asyncio-with-pyqt6.html,建议使用以下pip安装git安装qasync+https://github.com/eyllanesc/qasync.git@PyQt6

但我似乎无法安装它,即使在使用有效凭据登录GitHub之后.这就是输出:

  remote: Repository not found.
  fatal: repository 'https://github.com/eyllanesc/qasync.git/' not found
  error: subprocess-exited-with-error

在继续与pyQt6主窗口交互(否则会挂起,直到应答过程获得答案)时,有没有其他方法可以很好地使用异步进程来等待来自外部API(POST)的慢速应答?

到目前为止,我发现了一些使用"from asyncqt import QEventLoop"的示例,但这样的包适用于PyQt5,而不适用于PyQt6:-(

🎖️ 优质答案
相关问题