inline void initMyResource() { Q_INIT_RESOURCE(qml); } QString LiveWindow::loadLiveWindow() { // Q_INIT_RESOURCE(qml); initMyResource(); return QStringLiteral("qrc:/com/machinekoder/live/LiveWindow.qml"); } Author nsnavare commented Oct 21, 2019 via email Hello, Thank you so much...
파일: main.cpp 프로젝트: thehumanweb/qml-runtime int main(int argc, char *argv[]) { Q_INIT_RESOURCE(preload); QGuiApplication app (argc, argv); if (app.arguments().count() != 2) { return 10; } QmlModule::registerTypes(); QString source = app.arguments().at(1)...
} QmlModule::registerTypes(); QString source = app.arguments().at(1); QmlRuntime::Ptrruntime(QmlRuntimeFactory::create());boolpreloaded = runtime->preload(QUrl(QLatin1String("qrc:/preload.qml"))); Q_ASSERT(preloaded); Q_UNUSED(preloaded); runtime->execute(QUrl(source));returnapp....
} QmlModule::registerTypes(); QString source = app.arguments().at(1); QmlRuntime::Ptrruntime(QmlRuntimeFactory::create());boolpreloaded = runtime->preload(QUrl(QLatin1String("qrc:/preload.qml"))); Q_ASSERT(preloaded); Q_UNUSED(preloaded); runtime->execute(QUrl(source));returnapp....