method 1:int main( int argc, char ** argv )
{
QPEApplication a( argc, argv );
skizzy mw;
a.showMainWidget( &mw );
return a.exec();
}
mothed 2:
QTOPIA_ADD_APPLICATION("skizzy",skizzy);
QTOPIA_MAIN
method 3:
static Main *m = 0;
void qtopiaInit( int argc, char *argv[] )
{
m = new Main();
qApp->showMainWidget(m);
}
void qtopiaDestroy()
{
delete m;
}
QTOPIA_MAIN
and the QTOPIA_MAIN macro is implemented as:
int main( int argc, char **argv )
{
QPEApplication a( argc, argv );
qtopiaInit( argc, argv );
int rv = a.exec();
qtopiaDestroy();
return rv;
}
all the examples comes from the offical documents (http//doc.trolltech.com)?who can tell me the difference ?
Bookmarks