'set center widgets'

def center(self):

    frameGm = self.frameGeometry()
    centerPoint = QDesktopWidget().availableGeometry().center()
    frameGm.moveCenter(centerPoint)
    self.move(frameGm.topLeft())
