28 lines
782 B
C++
28 lines
782 B
C++
#include "src/mainwindow/mainwindow.h"
|
|
#include "ElaApplication.h"
|
|
#include "src/utils/configmanager.h"
|
|
#include <QApplication>
|
|
#include <QCoreApplication>
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QString basePath = QCoreApplication::applicationDirPath();
|
|
|
|
qputenv("QT_PLUGIN_PATH", basePath.toUtf8());
|
|
|
|
// QODBC Unicode 模式: 规避 Oracle char/varchar2 字段读取 NULL 问题
|
|
qputenv("QODBC_USE_UNICODE", "1");
|
|
|
|
QApplication a(argc, argv);
|
|
a.setWindowIcon(QIcon(":resources/images/gjx.png"));
|
|
eApp->init();
|
|
|
|
QCoreApplication::addLibraryPath(basePath);
|
|
QCoreApplication::addLibraryPath(basePath + "/sqldrivers");
|
|
|
|
ConfigManager::instance()->loadConfig(basePath);
|
|
|
|
MainWindow w;
|
|
w.show();
|
|
return a.exec();
|
|
} |