title: How to make a widget in the center of the screen in PySide/PyQt?
body: <p>This code works, but I wonder if there is any simpler way:</p>
  
  <pre><code>def center(self):
      qr = self.frameGeometry()
      cp = gui.QDesktopWidget().availableGeometry().center()
      qr.moveCenter(cp)
      self.move(qr.topLeft())
  </code></pre>