1 Star 0 Fork 0

很随意丶丶 / APCDraw_V2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.cpp 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
很随意丶丶 提交于 2020-01-07 14:51 . first commit
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QSslSocket>
#include <QFile>
#include <commonfun.h>
#include <QDebug>
int main(int argc, char *argv[])
{
//qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
//QApplication::setAttribute(Qt::AA_UseOpenGLES);
QApplication app(argc, argv);
app.setOrganizationName("汇科智控");
app.setOrganizationDomain("组态");
QQmlApplicationEngine engine;
qmlRegisterSingletonType(QUrl("qrc:/APCCommon/Common.qml"), "Common.API", 1, 0, "JS_DB_API");
qmlRegisterSingletonType<CommonFun>("Common.API", 1, 0, "C_API", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QObject * { Q_UNUSED(engine) Q_UNUSED(scriptEngine) return new CommonFun();});
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
if (engine.rootObjects().isEmpty())
return -1;
qSetMessagePattern("[%{time h:mm:ss.zzz} %{if-debug}Debug%{endif}%{if-warning}Waring%{endif}%{if-critical}Critical%{endif}%{if-fatal}Fatal%{endif}] %{file}:%{line} : %{message}");
return app.exec();
}
QML
1
https://gitee.com/zhimingchang_admin/APCDraw_V2.git
git@gitee.com:zhimingchang_admin/APCDraw_V2.git
zhimingchang_admin
APCDraw_V2
APCDraw_V2
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891