int main(int argc, char** argv) { QString fPath = QString(argv[0]); appName = fPath.mid( fPath.findRev("/") +1 ); appPath = fPath.left( fPath.findRev("/") ); DBG_OUT("App Name : %s", appName.ascii() ); DBG_OUT("App Path : %s", appPath.ascii() ); checkDirectories(); APPDB_Open(); ZApplication* app = new ZApplication(argc, argv); FullPath_7z = APP_FULLPATH_7Z; if ( !detectLanguageFile(appPath) ) { detectLanguageFile( APP_SYSFILES_PATH ); } if ( !LoadCustomizationFile(appPath) ) { LoadCustomizationFile( APP_SYSFILES_PATH ); } srand( (int)getpid() ); if (argc>1) { if ( checkParameters(argc,argv) ) { delete app; return 0; } } // LoadAllRegisteredApp(); DBG_OUT("Register Load DONE"); zBaseGUI *gui = new zBaseGUI(NULL); // DBG_OUT("GUI Done (gui = %Xl , app = %Xl )", (uint)gui, (uint)app); app->setMainWidget(gui); // DBG_OUT("Set Main"); gui->show(); int ret=app->exec(); //int ret=0; delete gui; delete app; APPDB_Close(); return ret; }
int main( int argc, char **argv ) { ZApplication* a = new ZApplication( argc, argv ); testWidget = new TestWidget(NULL, NULL); testWidget->setGeometry(0,0,240,320); a->setMainWidget(testWidget); testWidget->show(); int ret = a->exec(); delete testWidget; delete a; return ret; }