Currently I'm using this snippet to know the DPI of each screen in the system, but I don't know how to tell which one is hosting the viewport.
from PySide2.QtWidgets import QApplication app = QApplication.instance() screens = app.screens() for s in screens: dpi = s.physicalDotsPerInch() print(dpi)