Skip to content

Commit

Permalink
Set plugin and import paths before loading main.qml
Browse files Browse the repository at this point in the history
This fixes missing imports at startup without messing around with the
environment.
  • Loading branch information
MartinBriza authored and patrickelectric committed Sep 8, 2023
1 parent 7539746 commit a16c3c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ int main(int argc, char *argv[])
app.setOrganizationName("patrickelectric");
commandLineParser.setApplication(&app);

QQmlApplicationEngine appEngine(QUrl("qrc:/main.qml"));
QQmlApplicationEngine appEngine;
commandLineParser.setEngine(&appEngine);
appEngine.load(QUrl("qrc:/main.qml"));

appEngine.addUrlInterceptor(UrlInterceptor::self());
ProvidesSomething::self()->setEngine(&appEngine);
Expand Down

0 comments on commit a16c3c9

Please sign in to comment.