Skip to content

Commit

Permalink
Stop setting AA_EnableHighDpiScaling since Qt Says it is not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
hmaarrfk committed Dec 29, 2024
1 parent dad4343 commit c4b74ad
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion wgpu/gui/qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,14 @@ def enable_hidpi():
except Exception:
pass # fail on non-windows
try:
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True)
# This flag is not needed on Qt6.6
# But it has been definitely giving me a warning since PySide 6.6
# I'm a little cautious of removing its application for much older
# PySide so I'm going to conditionally disable it for "newer" PySide
# hmaarrfk -- 2024/12
# https://doc.qt.io/qt-6/highdpi.html
if qt_version < (6, 6):

Check failure on line 133 in wgpu/gui/qt.py

View workflow job for this annotation

GitHub Actions / Test Linting

Ruff (F821)

wgpu/gui/qt.py:133:12: F821 Undefined name `qt_version`
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True)
except Exception:
pass # fail on older Qt's

Expand Down

0 comments on commit c4b74ad

Please sign in to comment.