How to use qasync - 1 common examples

To help you get started, we’ve selected a few qasync examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github almarklein / wgpu-py / visvis2 / View on Github external
def paintEngine(self):
        #  WA_PaintOnScreen
        return None

app = QtWidgets.QApplication([])

# %% Integrate QT with asyncio

if False:
    # The qasync way, probably the best way, but needs a new event loop, so
    # does not integrate so well (yet) with IDE's.
    loop = qasync.QEventLoop(app)

    # An experimental Pyzo thing I hacked together to switch loops
    if hasattr(asyncio, "integrate_with_ide"):
        asyncio.integrate_with_ide(loop, run=False)
    # The quick-n-dirty way, simple and effective, but this limits the
    # rate in which qt can process events. If we could get an event
    # when qt has pending events, this might actually be effective.
    async def _keep_qt_alive():
        while True:
            await asyncio.sleep(0.01)



Implementation of the PEP 3156 Event-Loop with Qt.

Latest version published 10 months ago

Package Health Score

71 / 100
Full package analysis

Popular qasync functions