When changing the display scaling in Windows 11 from 100% to 125% or 150%, the PyQt5 application and its elements (labels, buttons, text, tables, etc.) change size accordingly.
image
While setting the environment variable prevents these elements from resizing, it causes the entire application window to become very large, similar to a zooming effect.
os.environ["QT_ENABLE_HIGHDPI_SCALING"] = "1"
How can I prevent this zooming effect and allow the application to be displayed at scaling levels other than 100% while maintaining the original size of its elements?