title: PyQt how to get correct window size
body: <p>I trying to get window size but I getting incorrect size, first of all I set window geometry to 800 x 480 and result is 640 x 480. Here is the code:</p>
  
  <pre><code>class MainWindow(QtGui.QWidget):
      def __init__(self):
           super(MainWindow, self).__init__()
  
           width = self.width()
           height = self.height()
           self.setGeometry(10, 10, 800, 480)
  </code></pre>
  
  <p><em>self.geometry().width() / height()</em> return the same results. why is that?</p>
  
  <p>EDIT: First need <em>self.setGeometry</em> and after that self.width() / height() (Thanks to <em>@eyllanesc</em>)</p>