Search code examples
pythonpyqtpython-asynciopyqt6

How use asyncio with pyqt6?


qasync doesn't support pyqt6 yet and I'm trying to run discord.py in the same loop as pyqt but so far I'm not doing the best. I've tried multiprocess, multithread, and even running synchronous code from non-synchronous code but I either end up with blocking code that makes the pyqt program non responsive or it just outright doesn't work. Can somebody please point me in the right direction?


Solution

  • qasync does not currently support PyQt6 but I have created a PR that implements it.

    At the moment you can install my version of qasync using the following command:

    pip install git+https://github.com/eyllanesc/qasync.git@PyQt6
    

    Probably in future releases my PR will be accepted so there will already be support for PyQt6

    They already accepted my PR so you can already install the latest version of qasync that has support for PyQt6.