This commit is contained in:
Kovid Goyal 2017-06-26 15:01:10 +05:30
parent 2291b2d2a0
commit 494d5dd92c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1282,10 +1282,11 @@ def ensure_app(headless=True):
with _ea_lock:
if _store_app is None and QApplication.instance() is None:
args = sys.argv[:1]
if headless and (islinux or isbsd):
has_headless = islinux or isbsd
if headless and has_headless:
args += ['-platformpluginpath', sys.extensions_location, '-platform', 'headless']
_store_app = QApplication(args)
if headless and (islinux or isbsd):
if headless and has_headless:
_store_app.headless = True
import traceback
# This is needed because as of PyQt 5.4 if sys.execpthook ==