I am trying to get the screen resolution from PySide:
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_())
I am on a macbook pro so I know the resolution is 2560-by-1600, but Qt seems to give the wrong answer consistently:
PySide.QtCore.QRect(0, 22, 1440, 874)
1440
900
PySide.QtCore.QRect(0, 0, 1440, 900)
did I do anything wrong here?