#include <iostream>
#include <QTranslator>
#include "sui_base_config.h"
#include "sui_base_ex.h"
#include "ctai.h"
#include <QApplication>
int main(int argc, char *argv[]){
    qputenv("QT_QPA_PLATFORM","windows:fontengine=freetype");
    QApplication a(argc, argv);
    QTranslator qtBaseTranslator;
    if (!qtBaseTranslator.load(QStringLiteral(":/res/translator/qtbase_zh_CN.qm")))
    {
        // 处理加载翻译文件失败的情况
        qDebug() << "Failed to load translation file.";
        return -1;
    }
    a.installTranslator(&qtBaseTranslator);
    
    //读取窗体配置文件
    sui_init_config();
    ctai x;
    x.init_layout();
    //仅限于windows平台
#if defined(__WIN32__)
    x.title()->set_type(QD_TYPE::QD_EXIT);
#endif
    x.show();
    return a.exec();
}