2019-10-15 00:00:18 +02:00
|
|
|
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)
|
2020-02-27 16:58:57 +01:00
|
|
|
qtapp.processEvents()
|
2019-10-15 00:00:18 +02:00
|
|
|
return qtapp, loop
|