Maya and high DPI PySide2 settings

I just got high DPI screens and I’m running into scaling issues with my custom tools. Outside of Maya they look fine (a little off from 1080p, but passable). However, in Maya my tool’s main window and inner widgets are tiny. Only a few text elements are scaled properly, but most of the text is also very tiny.

When testing my UI outside of Maya I set os.environ['QT_AUTO_SCREEN_SCALE_FACTOR'] = '1' and that seems to work well. I’ve tried passing this variable to Maya via subprocess.Popen on launch, but it doesn’t really do anything. Changing the scale within Maya’s preferences makes Maya’s UI larger, but doesn’t impact my tool.

I can’t seem to find a fix for this. The only thing I can think of at this point is to enable custom UI scaling from within my tool. Any help is appreciated, thanks!

I’ve solved scaling in my tools by using QGraphicsScene so I can use my tools on 1080p, 4k or 8k monitors. This is not a solution to Your problem but I hope it can help You.

Thanks for the input! I’ll do some research on it