-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
47 lines (32 loc) · 1.02 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
ZHSC
main.cpp
v 0.0.1
2003/06/23
Copyright (C) 2003 Cavendish
http://www.qiliang.net/software/zhsc.html
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
*/
#include <qapplication.h>
#include <qtranslator.h>
#include "codec.h"
#include "zhscmw.h"
QTextCodec *g_pCodec;
int main( int argc, char ** argv )
{
g_pCodec=QTextCodec::codecForName("GB18030");
QApplication a( argc, argv );
QTranslator translator_qt( 0 );
translator_qt.load("qt_zh_CN.qm",".");
a.installTranslator( & translator_qt );
ZhscMainWindow *mw = new ZhscMainWindow( 0, "Zhsc Main Window" );
a.setMainWidget(mw);
mw->setCaption( "Zhsc" );
mw->show();
a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()) );
return a.exec();
}