16,202
社区成员
发帖
与我相关
我的任务
分享
int main( int argc, char ** argv )
{
QApplication a( argc, argv );
ABMainWindow *mw = new ABMainWindow();
mw->setCaption( "Qt Example - Addressbook" );
a.setMainWidget( mw );
mw->show();
a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
int result = a.exec();
delete mw;
return result;
}
但是,qt4中没有setMainWidget(),我要想实现此功能,该怎么办?