manager/qubesmanager/tests/__init__.py
Marta Marczykowska-Górecka 6f73ef2163
Fixed manager tests to use Qt5
Also due to old workarounds not working around anymore,
switched over to "single QApplication object" model.
2019-10-15 01:28:04 +02:00

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