沒有直接的方法,使用move函數 const QRect screen = QApplication::desktop()->screenGeometry();
this->move( screen.center() - this->rect().center() );