Qt5:視窗居中顯示

weixin_30919571發表於2013-07-08

QDesktopWidget* desktop = QApplication::desktop(); // =qApp->desktop();也可以
move((desktop->width() - this->width())/2, (desktop->height() - this->height())/2);

轉載於:https://www.cnblogs.com/wowk/p/3177041.html

相關文章