Setup KDeclarative before loading the Qml file
Otherwise methods injected into the engine by KDeclarative are not available in the loaded qml. REVIEW: 124419
This commit is contained in:
parent
e462c386cf
commit
cc148cea89
1 changed files with 3 additions and 1 deletions
|
@ -39,11 +39,13 @@ int main(int argc, char *argv[])
|
|||
aboutData.processCommandLine(&parser);
|
||||
}
|
||||
|
||||
QQmlApplicationEngine engine(QUrl("qrc:/qml/main.qml"));
|
||||
QQmlApplicationEngine engine;
|
||||
|
||||
KDeclarative::KDeclarative kdeclarative;
|
||||
kdeclarative.setDeclarativeEngine(&engine);
|
||||
kdeclarative.setupBindings();
|
||||
|
||||
engine.load(QUrl("qrc:/qml/main.qml"));
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue