mirror of
https://github.com/JasonYANG170/AIChatForPC.git
synced 2024-11-27 14:16:30 +00:00
33 lines
729 B
C++
33 lines
729 B
C++
|
#include "dialog.h"
|
||
|
#include "mainwindow.h"
|
||
|
|
||
|
#include <QApplication>
|
||
|
|
||
|
#include <QLocale>
|
||
|
#include <QTranslator>
|
||
|
|
||
|
int main(int argc, char *argv[])
|
||
|
{
|
||
|
QApplication a(argc, argv);
|
||
|
|
||
|
QTranslator translator;
|
||
|
const QStringList uiLanguages = QLocale::system().uiLanguages();
|
||
|
for (const QString &locale : uiLanguages) {
|
||
|
const QString baseName = "YANG-Chat_" + QLocale(locale).name();
|
||
|
if (translator.load(":/i18n/" + baseName)) {
|
||
|
a.installTranslator(&translator);
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
MainWindow w;
|
||
|
w.show();
|
||
|
// Dialog ws;
|
||
|
// ws.show();
|
||
|
|
||
|
//获取可用桌面大小
|
||
|
// 禁止拖动窗口大小
|
||
|
|
||
|
return a.exec();
|
||
|
}
|