Show More
@@ -12,18 +12,16 b' def inputhook(context):' | |||
|
12 | 12 | app = QtCore.QCoreApplication.instance() |
|
13 | 13 | if not app: |
|
14 | 14 | if sys.platform == 'linux': |
|
15 | try: | |
|
16 | # DISPLAY or WAYLAND_DISPLAY is set and not empty | |
|
17 | assert os.environ.get('DISPLAY') or os.environ.get('WAYLAND_DISPLAY') | |
|
18 | except Exception: | |
|
15 | if not os.environ.get('DISPLAY') \ | |
|
16 | and not os.environ.get('WAYLAND_DISPLAY'): | |
|
19 | 17 | import warnings |
|
20 | 18 | global _already_warned |
|
21 | 19 | if not _already_warned: |
|
22 | 20 | _already_warned = True |
|
23 | 21 | warnings.warn( |
|
24 |
'The DISPLAY enviroment variable is |
|
|
25 |
'and Qt5 requires this enviroment |
|
|
26 | 'Deactivate Qt5 code.' | |
|
22 | 'The DISPLAY or WAYLAND_DISPLAY enviroment variable is ' | |
|
23 | 'not set or empty and Qt5 requires this enviroment ' | |
|
24 | 'variable. Deactivate Qt5 code.' | |
|
27 | 25 | ) |
|
28 | 26 | return |
|
29 | 27 | _appref = app = QtGui.QApplication([" "]) |
General Comments 0
You need to be logged in to leave comments.
Login now