8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e53cb0e + f008360 commit 90e25ecCopy full SHA for 90e25ec
lib/matplotlib/backends/backend_qt5.py
@@ -118,6 +118,11 @@ def _create_qApp():
118
if display is None or not re.search(r':\d', display):
119
raise RuntimeError('Invalid DISPLAY variable')
120
121
+ try:
122
+ QtWidgets.QApplication.setAttribute(
123
+ QtCore.Qt.AA_EnableHighDpiScaling)
124
+ except AttributeError: # Attribute only exists for Qt>=5.6.
125
+ pass
126
qApp = QtWidgets.QApplication([b"matplotlib"])
127
qApp.lastWindowClosed.connect(qApp.quit)
128
else:
@@ -126,7 +131,6 @@ def _create_qApp():
131
if is_pyqt5():
132
try:
133
qApp.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps)
129
- qApp.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling)
130
134
except AttributeError:
135
pass
136
0 commit comments