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 1515
1616from distutils .version import LooseVersion
1717import os
18+ import platform
1819import sys
1920
2021import matplotlib as mpl
@@ -183,8 +184,10 @@ def is_pyqt5():
183184# Fixes issues with Big Sur
184185# https://bugreports.qt.io/browse/QTBUG-87014, fixed in qt 5.15.2
185186if (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"
188191
189192
190193# These globals are only defined for backcompatibility purposes.
You can’t perform that action at this time.
0 commit comments