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 fcae779 commit 2aee819Copy full SHA for 2aee819
wgpu/gui/qt.py
@@ -98,10 +98,16 @@
98
99
def enable_hidpi():
100
"""Enable high-res displays."""
101
+ try:
102
+ set_dpi_aware = QtCore.__version_info__ < (6, 4)
103
+ except Exception:
104
+ set_dpi_aware = True
105
try:
106
# See https://github.com/pyzo/pyzo/pull/700 why we seem to need both
- ctypes.windll.shcore.SetProcessDpiAwareness(1) # global dpi aware
- ctypes.windll.shcore.SetProcessDpiAwareness(2) # per-monitor dpi aware
107
+ # See https://github.com/pygfx/pygfx/issues/368 for high Qt versions
108
+ if set_dpi_aware:
109
+ ctypes.windll.shcore.SetProcessDpiAwareness(1) # global dpi aware
110
+ ctypes.windll.shcore.SetProcessDpiAwareness(2) # per-monitor dpi aware
111
except Exception:
112
pass # fail on non-windows
113
0 commit comments