나는 PySide에서 화면 해상도를 얻기 위해 노력하고 있어요 : 그래서 해상도가 2560 1600 알Qt가 잘못된 화면 지오메트리를 제공합니까?
class Prog(QtGui.QDialog):
def __init__(self):
super().__init__()
self.timer = QtCore.QTimer()
desktop = QtGui.QDesktopWidget()
dim = desktop.availableGeometry(desktop.primaryScreen())
print(dim)
print(desktop.width())
print(desktop.height())
print(QtGui.QApplication.desktop().screenGeometry())
app = QtGui.QApplication(sys.argv)
prog = Prog()
prog.show()
sys.exit(app.exec_())
나는 맥북 프로에 생각을하지만, Qt는 지속적으로 잘못된 대답을 줄 것으로 보인다 :
PySide.QtCore.QRect(0, 22, 1440, 874)
1440
900
PySide.QtCore.QRect(0, 0, 1440, 900)
여기 제가 잘못 했나요? 당신이 찾을 수 retina display support 주로이 부분 Mac OS X High-dpi Support
:
Qt 5의 특정 화면에 대한 정확한 화면 해상도를 얻으려면 QScreen :: devicePixelRatio (망막 디스플레이의 경우 값 2.0을 반환)를 사용하고 QScreen 너비와 높이를 곱하십시오. –