Hello,
I have a Qt Quick app that uses MSVC 2013 64 bit Qt 5.5. Following these instructions http://doc.qt.io/qt-5/windows-deployment.html the app deploys and runs OK. If an object is created in C++ and setContextProperty is used the app runs OK in Qt Creator. But when deployed no window is shown and it has to be exited by ending it in Windows task manager. What is needed to deploy with setContextProperty?
QQmlEngine engine;
MyObject myObject;
myObject.initialize();
engine.rootContext()->setContextProperty("myObject", &myObject);
QQmlComponent component
(&engine,
QUrl(QStringLiteral
("qrc:/main.qml")));
QObject *context
= component.
create();
return app.exec();
QQmlEngine engine;
MyObject myObject;
myObject.initialize();
engine.rootContext()->setContextProperty("myObject", &myObject);
QQmlComponent component(&engine, QUrl(QStringLiteral("qrc:/main.qml")));
QObject *context = component.create();
return app.exec();
To copy to clipboard, switch view to plain text mode
Bookmarks