Created
November 22, 2013 07:11
-
-
Save Cysu/7596046 to your computer and use it in GitHub Desktop.
Python: PyQt- Move widget to center
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fg = self.frameGeometry() | |
cp = QtGui.QDesktopWidget().availableGeometry().center() | |
fg.moveCenter(cp) | |
self.move(fg.topLeft()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, this helped me.