I'm trying to use the QtAsyncio library in pyside 6 and with the python-snapcast library and i can't manage to find a way to replace the asyncio loop that the create_server function necessitates with something from QtAsyncio
I tried to use QtAsyncio.run since it creates the loop by itself but the create_server function necessitates a variable with the loop.
server = QtAsyncio.run(create_server(ip_value))
this is the normal implementation with asycnio
server = loop.run_until_complete(create_server(loop, 'localhost'))
You can get the running loop by calling
get_running_loop. Just put a small wrapper around yourcreate_servercall to retrieve the loop: