File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 15
15
16
16
from distutils .version import LooseVersion
17
17
import os
18
+ import platform
18
19
import sys
19
20
20
21
import matplotlib as mpl
@@ -183,8 +184,10 @@ def is_pyqt5():
183
184
# Fixes issues with Big Sur
184
185
# https://bugreports.qt.io/browse/QTBUG-87014, fixed in qt 5.15.2
185
186
if (sys .platform == 'darwin' and
186
- LooseVersion (QtCore .qVersion ()) < LooseVersion ('5.15.2' )):
187
- os .environ ['QT_MAC_WANTS_LAYER' ] = '1'
187
+ LooseVersion (platform .mac_ver ()[0 ]) >= LooseVersion ("10.16" ) and
188
+ LooseVersion (QtCore .qVersion ()) < LooseVersion ("5.15.2" ) and
189
+ "QT_MAC_WANTS_LAYER" not in os .environ ):
190
+ os .environ ["QT_MAC_WANTS_LAYER" ] = "1"
188
191
189
192
190
193
# These globals are only defined for backcompatibility purposes.
You can’t perform that action at this time.
0 commit comments