widget *s =new widget;
s->move((QApplication::desktop()->width()-s->width())/2,
(QApplication::desktop()->height()-s->height())/2);
s->show();
widget *s =new widget;
s->move((QApplication::desktop()->width()-s->width())/2,
(QApplication::desktop()->height()-s->height())/2);
s->show();
转载于:https://www.cnblogs.com/lvdongjie/p/3706184.html