QT获取屏幕分表率(PC、安卓) QRect screenRect = QGuiApplication::primaryScreen()->geometry(); double devicePixelRatio = QGuiApplication::primaryScreen()->devicePixelRatio(); int screenW = screenRect.width(); int screenH = screenRect.height();