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