Details
-
Bug
-
Resolution: Invalid
-
P5: Not important
-
None
-
1.1.1
-
None
-
debian (jessy) server 'libqt 4.8.5 , python-pyside 1.1.1, WinXP host in a VMware virtual machine.
Description
Screen width and Screen height is always, regarding less to size of actual WinXP virtual machine:
Screen width: 1448
Screen height: 853
VMware tools are installed. Python with tkinter or with wx works fine on the same wirtual machine.
Code runs under debian jessy. export DISPLAY=192.168.0.44:0.0 , then windows are send to VMWare virtual maschine.
PySide Code:
def main():
#Init app
qt_app = QApplication(sys.argv)
global MESSAGE
init_message(message="blah-blah, blah-blah. " * 7)
screen = QDesktopWidget().screenGeometry()
size = MESSAGE.geometry()
MESSAGE.move((screen.width()-size.width())/2, (screen.height()-size.height())/2)
MESSAGE.show()
qt_app.exec_()
print "width: ", size.width()
print "height: ", size.height()
print "Screen width: ", screen.width()
print "Screen height: ", screen.height()
print "MESSAGE closed."
Workaround: calculate screen dimensions using tkinter or wx.