int main(int argc, char *argv[])
{
QApplication ap(argc, argv);
QDesktopWidget *pDesk = QApplication::desktop();
CVxMainWindow wd(pDesk);
wd.show();
wd.move((pDesk->width() - wd.width()) / 2, (pDesk->height() - wd.height()) / 2);
return ap.exec();
}
原文:http://www.cnblogs.com/wangzhigang/p/5194305.html