Fix the bug of static resources didn't imported by engine.

This commit is contained in:
Mentalflow
2023-07-10 19:07:54 +08:00
parent ea88707366
commit 9f24cdaebd
4 changed files with 90 additions and 67 deletions

View File

@ -38,6 +38,9 @@ int main(int argc, char *argv[])
app.setQuitOnLastWindowClosed(false);
QQmlApplicationEngine engine;
FramelessHelper::Quick::registerTypes(&engine);
#ifdef FLUENTUI_BUILD_STATIC_LIB
engine.addImportPath("qrc:/"); // 让静态资源可以被QML引擎搜索到
#endif
qmlRegisterType<CircularReveal>("example", 1, 0, "CircularReveal");
appInfo->init(&engine);
const QUrl url(QStringLiteral("qrc:/example/qml/App.qml"));