Python Panel UI not scaling when using pixel dimensions

   1621   1   0
User Avatar
Member
214 posts
Joined: Oct. 2008
Offline
Hi,

I have some elements in my python panel that need to be defined in pixels (I have a QGraphicSceneView with QGraphicScene and QGraphicsItems in it). On my regular monitor, all is good. On a high DPI monitor, everything is too small. Also, doesn't respond to changes in the global UI scale. I have tried setting QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True), but that doesn't seem to have an effect.

Any ideas?

Thanks!
User Avatar
Member
214 posts
Joined: Oct. 2008
Offline
Guessing I need to use hou.ui.scaledSize() everywhere I need to use pixel dimensions.
  • Quick Links