run_event_loop
Runs the main Slint event loop. If specified, the coroutine main_coro is run in parallel. The event loop doesn’t
terminate when the coroutine finishes, it terminates when calling quit_event_loop.
Example:
import slint
...image_model: slint.ListModel[slint.Image] = slint.ListModel()...
async def main_receiver(image_model: slint.ListModel) -> None: async with aiohttp.ClientSession() as session: async with session.get("http://some.server/svg-image") as response: svg = await response.read() image = slint.Image.from_svg_data(svg) image_model.append(image)
...slint.run_event_loop(main_receiver(image_model))python
© 2026 SixtyFPS GmbH