Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Qt Widgets and High Dpi on 4k monitor (Windows)

Message 1 of 8
4358 Views, 7 Replies

Qt Widgets and High Dpi on 4k monitor (Windows)

Does anyone know a workaround to automatically scale Qt widgets on high density pixel monitors running Maya on Windows? Right now the widget is 1:1, making it look half the size it is suppose to. (Linux and Mac does the job with no extra setting).

This is what it's suppose to look:


This is what it looks:


I appreciate if anyone has experienced this issue and knows the solution.

Tags (1)
Message 2 of 8
in reply to: Anonymous


This page has a bunch of info that could help you with high DPI.  You might want to look into the QT_AUTO_SCREEN_SCALE_FACTOR and Qt::AA_EnableHighDpiScaling methods.


I have a toolbox UI that was getting squished really small on a 4k monitor and tried to use these but was unsuccessful.  I was probably doing something wrong in my code.  I was already planning on re-doing the whole UI in Designer to have better Layouts, and better min/max stretch values.  I did this instead.  This wound up fixing my UI so that it works for either 1080p or 4k.

Message 3 of 8
in reply to: gilleybaba

Tks, I've tried the instruction on this link a few months ago, but it didn't work at all. Plus, that seems to be only for Qt 5.6 or later, I need to support Maya 2014 and newer, so I expect there is a solution for those without having to hard code the widget scaling.

Unfortunately Qt Designer is not an option for me, as most of the widgets are dynamic. I haven't tested creating the main parent widget in Qt Designer and dynamically build the children widgets, do you think that worth a try?


Message 4 of 8
in reply to: Anonymous

Did you manage to find a solution?



Message 5 of 8
in reply to: Anonymous

Not really. The only half-solution was suggested in this post (I hope you can read it)

Message 6 of 8
in reply to: Anonymous

We are going to check that.

Message 7 of 8
in reply to: Anonymous



I think I have the same problem. 🙂


I'm working on some scripts with and the Qt autoscaling is not working.

If I start the app in standalone mode (direct with external python) the Qt variables are working and it is scaling correctly.


Tried the following:


os.environ["QT_AUTO_SCREEN_SCALE_FACTOR"] = "1"
# os.environ["QT_SCALE_FACTOR"] = "1.5"
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True)

 But I think its only working in external/standalone because of the env variables (not used through Maya?)?


Is there any workaround for the High-DPI scaling of custom Maya scripts with Qt?

Of course, we can query the current Maya scaling and change the width, height, fontsize etc. but...... I think this is a neverending story for bigger scripts/Qt-Layouts. 😕




Maya 2018.5

Windows 10, Latest



The link is not working


Message 8 of 8
in reply to: Anonymous

hi I've been investigating this issue as well.

This post was useful - thanks for sharing, i had some interesting findings when playing with:


 I started a thread here to collate my findings. 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report