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.