Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-180

screenGeometry() of a virtual machine (VMware, guest WinXP) is read wrong

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P5: Not important
    • None
    • 1.1.1
    • PySide
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            egerlach Eckard Gerlach
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes