Skip to content

Commit

Permalink
Enabled high DPI scaling support for Qt when starting qudi. This shou…
Browse files Browse the repository at this point in the history
…ld improve visuals on high DPI (mixed) monitor systems.
  • Loading branch information
Neverhorst committed Nov 10, 2021
1 parent 0d32b17 commit ac582ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/qudi/core/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@

# Set QT_API environment variable to PySide2
os.environ['QT_API'] = 'pyside2'
# Enable the High DPI scaling support of Qt5
os.environ['QT_ENABLE_HIGHDPI_SCALING'] = '1'

if sys.platform == 'win32':
# Set QT_LOGGING_RULES environment variable to suppress qt.svg related warnings that otherwise
Expand All @@ -66,7 +68,7 @@
if sys.platform == 'win32':
try:
import ctypes
myappid = 'quantumoptics.qudi.mainapp' # arbitrary string
myappid = 'qudicore-app' # arbitrary string
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
except ImportError:
raise
Expand Down

0 comments on commit ac582ee

Please sign in to comment.