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.
1 parent fa7defc commit ab905c8Copy full SHA for ab905c8
rendercanvas/qt.py
@@ -159,7 +159,11 @@ def enable_hidpi():
159
except Exception:
160
pass # fail on non-windows
161
try:
162
- QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True)
+ # https://doc.qt.io/qtforpython-6/faq/porting_from2.html#class-function-deprecations
163
+ # > High DPI is by default enabled in Qt 6 and cannot be turned off.
164
+ dpi_scaling_not_deprecated = qt_version_info[0] < 6
165
+ if dpi_scaling_not_deprecated:
166
+ QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True)
167
168
pass # fail on older Qt's
169
0 commit comments