1 Star 15 Fork 9

觉皇/QtIAPmerge

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.cpp 1.00 KB
一键复制 编辑 原始数据 按行查看 历史
觉皇 提交于 2024-05-19 11:32 +08:00 . 修复bug
#include "iapmergedialog.h"
#include <QApplication>
#include <QFile>
#include <QTranslator>
#include <QDebug>
#include <QTextCodec>
#include <QMessageBox>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
#if 1 // 加载翻译文件
QTranslator base;
if(base.load(":/translations/qt_zh_CN.qm"))
{
a.installTranslator(&base);
}else
{
QMessageBox::warning(nullptr, QObject::tr("警告"), QObject::tr("加载翻译文件qt_zh_CN.qm失败,部分界面可能无法汉化显示!"));
}
#endif
#if 1 // 加载主题文件
QFile f(":/qdarkstyle/light/lightstyle.qss");
// QFile f(":/qdarkstyle/dark/darkstyle.qss");
if (!f.exists())
{
printf("Unable to set stylesheet, file not found\n");
}
else
{
f.open(QFile::ReadOnly | QFile::Text);
QTextStream ts(&f);
qApp->setStyleSheet(ts.readAll());
}
#endif
IAPMergeDialog w;
w.show();
return a.exec();
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/jhembed/QtIAPmerge.git
git@gitee.com:jhembed/QtIAPmerge.git
jhembed
QtIAPmerge
QtIAPmerge
main

搜索帮助