移动开发QT获取屏幕分表率(PC、安卓) 云博小周宇2024年5月5日2023年8月20日1 Min Read QRect screenRect = QGuiApplication::primaryScreen()->geometry(); double devicePixelRatio = QGuiApplication::primaryScreen()->devicePixelRatio(); int screenW = screenRect.width(); int screenH = screenRect.height();