Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@

@fixture(scope='session')
def application():
from quamash import QApplication
return QApplication([])
from quamash import QCoreApplication
return QCoreApplication([])
12 changes: 3 additions & 9 deletions quamash/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,7 @@
logger.info('Using Qt Implementation: {}'.format(QtModuleName))

QtCore = __import__(QtModuleName + '.QtCore', fromlist=(QtModuleName,))
QtGui = __import__(QtModuleName + '.QtGui', fromlist=(QtModuleName,))
if QtModuleName == 'PyQt5':
from PyQt5 import QtWidgets
QApplication = QtWidgets.QApplication
else:
QApplication = QtGui.QApplication

QCoreApplication = QtCore.QCoreApplication

from ._common import with_logger

Expand Down Expand Up @@ -237,8 +231,8 @@ class _QEventLoop:
"""

def __init__(self, app=None):
self.__app = app or QApplication.instance()
assert self.__app is not None, 'No QApplication has been instantiated'
self.__app = app or QCoreApplication.instance()
assert self.__app is not None, 'No QCoreApplication has been instantiated'
self.__is_running = False
self.__debug_enabled = False
self.__default_executor = None
Expand Down