title: How to get the screen position of `QMainWindow` and print it?
body: <p>I'm trying to get the screen position of <code>QMainWindow</code> and <code>print</code> the position (x,y) values. I have tried both <code>self.pos()</code> and <code>self.mapToGlobal(self.pos())</code> and both of these return <code>0</code>.</p>
  
  <pre><code>import sys
  from PyQt5.QtWidgets import QApplication, QMainWindow
  
  
  class MainWindow(QMainWindow):
  
      def __init__(self):
          QMainWindow.__init__(self)
          self.resize(400, 200)
  
          # PRINTS 0 0
          print(self.pos().x(), self.pos().y())
  
          # PRINTS 0 0
          print(self.mapToGlobal(self.pos()).x(), self.mapToGlobal(self.pos()).y())
  
  
  app = QApplication(sys.argv)
  window = MainWindow()
  window.show()
  sys.exit(app.exec_())
  </code></pre>
  
  <p>I'm using Python 3.7 and PyQt 5.11, how can I achieve this?</p>