Closed jamesdbrock closed 10 months ago
Related to https://github.com/CabbageDevelopment/qasync/issues/69
Hi @jamesdbrock, thanks for bringing this up. I haven't had time to address the lack of documentation. If you can expand a bit on your changes: perhaps add some basic examples to examples/
and add more structure to the readme, that would be great.
If you can expand a bit on your changes: perhaps add some basic examples to
examples/
and add more structure to the readme, that would be great.
I'd love to, but can we merge this PR first and then I'll add more PRs for more documentation improvements?
I think the addition of "can be used with set_event_loop
" is not quite enough to pass as documentation improvements. The QEventLoop can be used with a bunch of other asyncio methods too. Rather than giving a one liner, I think we're better off having some toy examples that demonstrate the use of async slots, async timers etc. right in the README.
If you find time to add more of these to this PR, please do so and I will review it again.
Here's the README text introduced by this PR:
qasync
allows coroutines to be used in PyQt/PySide applications by providing class QEventLoop
, which is
an implementation of the PEP 3156 AbstractEventLoop
and can be used in set_event_loop
.
import asyncio
import qasync
asyncio.set_event_loop(qasync.QEventLoop())
Superseded by #102
Great package, thanks for maintaining it.
It seems to have no documentation though? Here's some slight documentation improvement.