//#include #include #include #include #include "QMainFrame.h" #include "QLoginWidget.h" int main( int argc, char * argv[] ) { //用于编码转换 //QTextCodec * pCodecLocal = QTextCodec::codecForLocale(); QApplication a( argc, argv ); QLoginWidget login; int iReturnCode = 0; /*try { initConnectionPool(); queryParameters(); if ( checkVersion() == false ) { QMessageBox::warning( NULL, pCodecLocal->toUnicode( "版本错误" ), pCodecLocal->toUnicode( "程序版本过低!\n请联系信息技术部更新程序!" ) ); return 0; } } catch ( std::runtime_error & error ) { releaseConnectionPool(); QMessageBox::critical( NULL, "错误", pCodecLocal->toUnicode( error.what() ) ); return iReturnCode; } catch ( std::exception & error ) { releaseConnectionPool(); QMessageBox::critical( NULL, "未知错误", pCodecLocal->toUnicode( error.what() ) ); return iReturnCode; }*/ login.exec(); if ( login.isLogin() == true ) { QMainFrame w; w.showMaximized(); iReturnCode = a.exec(); } //releaseConnectionPool(); return iReturnCode; }