Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def center_window(w):
- from PyQt4 import QtGui
- d = QtGui.QApplication.desktop()
- s = w.size()
- w.move((d.width() - s.width()) / 2, (d.height() - s.height()) / 2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement