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
…657)

* Stop setting AA_EnableHighDpiScaling since Qt Says it is not needed

See https://doc.qt.io/qt-6/highdpi.html

* update comment

* fix variable name

* Update wgpu/gui/qt.py
  • Loading branch information
hmaarrfk authored Dec 29, 2024
1 parent dad4343 commit 7a9cef4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions wgpu/gui/qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,16 @@ 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
# 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_info < (6, 6):
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True)
except Exception:
pass # fail on older Qt's
pass # fail on much older Qt's


# If you import this module, you want to use wgpu in a way that does not suck
Expand Down

0 comments on commit 7a9cef4

Please sign in to comment.