diff --git a/wgpu/gui/qt.py b/wgpu/gui/qt.py index 8265678a..898e7121 100644 --- a/wgpu/gui/qt.py +++ b/wgpu/gui/qt.py @@ -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