-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
executable file
·32 lines (30 loc) · 877 Bytes
/
main.cpp
File metadata and controls
executable file
·32 lines (30 loc) · 877 Bytes
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
#include <QtGlobal>
#if QT_VERSION >= 0x050000
#include <QtWidgets/QApplication>
#else
#include <QtGui/QApplication>
#endif
#include "mainwindow.h"
#include <QTextCodec>
#include <QtPlugin>
#include <QPluginLoader>
#include <QCoreApplication>
#include <QTranslator>
int main(int argc, char *argv[])
{
qRegisterMetaType<QList<QImage> >("QList<QImage>");
QApplication a(argc, argv);
a.addLibraryPath(QCoreApplication::applicationDirPath());
#ifdef Q_WS_WIN
QTextCodec::setCodecForLocale(QTextCodec::codecForName("GB18030"));
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("GB18030"));
QTextCodec::setCodecForTr(QTextCodec::codecForName("GB18030"));
#endif
QTranslator trans;
trans.load(":/trans/extractor.qm");
a.installTranslator(&trans);
MainWindow w(0,argv[1]);
//w.show();
w.showMaximized();
return a.exec();
}