6f73ef2163
Also due to old workarounds not working around anymore, switched over to "single QApplication object" model.
17 lines
310 B
Python
17 lines
310 B
Python
import asyncio
|
|
import sys
|
|
|
|
import quamash
|
|
from PyQt5 import QtWidgets
|
|
|
|
qtapp = None
|
|
loop = None
|
|
|
|
def init_qtapp():
|
|
global qtapp, loop
|
|
if qtapp is None:
|
|
qtapp = QtWidgets.QApplication(sys.argv)
|
|
loop = quamash.QEventLoop(qtapp)
|
|
asyncio.set_event_loop(loop)
|
|
return qtapp, loop
|