Merge pull request #682 from campagnola/qapp-fix
Fix: mkQApp returned None if a QApplication was already created elsewhere
This commit is contained in:
commit
3ffd7dbb97
@ -276,7 +276,8 @@ if m is not None and list(map(int, m.groups())) < versionReq:
|
||||
|
||||
QAPP = None
|
||||
def mkQApp():
|
||||
global QAPP
|
||||
if QtGui.QApplication.instance() is None:
|
||||
global QAPP
|
||||
QAPP = QtGui.QApplication.instance()
|
||||
if QAPP is None:
|
||||
QAPP = QtGui.QApplication([])
|
||||
return QAPP
|
||||
|
Loading…
Reference in New Issue
Block a user