def center(self): """Center the window within the current screen.""" raise NotImplementedError screen = QtGui.QDesktopWidget().screenGeometry() size = self.geometry() self.move((screen.width()-size.width())/2, (screen.height()-size.height())/2)