Qt之setMainWidget()

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;
}


来自: http://blog.csdn.net/ranruoyu1003/article/details/4932709


为什没有的Qt里面有QApplication::setMainWidget(),而有的Qt里面没有?

你可能感兴趣的:(Qt之setMainWidget())