Skip to content

Instantly share code, notes, and snippets.

@Cysu
Created November 22, 2013 07:11
Show Gist options
  • Save Cysu/7596046 to your computer and use it in GitHub Desktop.
Save Cysu/7596046 to your computer and use it in GitHub Desktop.
Python: PyQt- Move widget to center
fg = self.frameGeometry()
cp = QtGui.QDesktopWidget().availableGeometry().center()
fg.moveCenter(cp)
self.move(fg.topLeft())
@Ahmed-Salama96
Copy link

Thanks, this helped me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment