Files
omni_tool/main.cpp
T
2026-09-17 08:49:06 +08:00

29 lines
884 B
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#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");
// 配置文件位于 程序目录/config/config.ini(loadConfig 内部使用 appConfigDir())
ConfigManager::instance()->loadConfig();
MainWindow w;
w.showMaximized();
return a.exec();
}