W dniu 13.11.2013 16:16, Jonni Rainisto pisze:
Hi,
Yes your setContextProperty() to rootContext is the right approach. Usually I
do something like this:
QScopedPointer<QGuiApplication> app(Sailfish::createApplication(argc,
argv));
QScopedPointer<QQuickView> view(Sailfish::createView());
MyClass data;
view->rootContext()->setContextProperty("myObject", &data);
Sailfish::setView(view.data(), "qrc:/main.qml");
I also recommend looking here (code example were very helpful to me):
http://qt-project.org/doc/qt-5.1/qtqml/qtqml-cppintegration-interactqmlfromcpp.html
Regards,
Filip
_______________________________________________
SailfishOS.org Devel mailing list