大学学生会申请书500字:C++ 代码的问题!谁能帮我解释一下?(能不能解释得清楚一点?)

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/28 12:50:12
#include <qapplication.h>
#include "ace/ACE.h"
#include "TableDisp.h"
#include "common/CommonClass.h"

int main( int argc, char ** argv )
{
CCommonClass::InitClass();

#ifndef WIN32
setlocale(LC_ALL,"zh");
#endif
ACE::init();

QApplication a( argc, argv );
QFont l_font("Song");
#ifdef WIN32
l_font.setFamily( CCommonClass::toUnicode("宋体"));
l_font.setPointSize(10);
#else
l_font.setPointSize(13);
#endif

QApplication::setFont(l_font);

TableDisp td;

QDesktopWidget *d = QApplication::desktop();
int height = d->height();
int width = height*4/3;
td.setGeometry((width-652)/2, (height-482)/2, 652, 482);
td.show();

a.setMainWidget(&td);
a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
int li_result = a.exec();
td.ReleaseSpace();

ACE::fini();

return li_result;
}