Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

[Solved]Calling function from QML to C++ class to get Json string PROBLEM.

$
0
0
Fail was here… QQuickView *view = new QQuickView;     view->rootContext()->setContextProperty("translation", (QObject *)&translation_obj);     view->rootContext()->setContextProperty("json", (QObject *)&file_obj); // Moved up this line... :D     view->setSource(QStringLiteral("qml/Main.qml"));     view->show(); Now everything works fine ;)

Viewing all articles
Browse latest Browse all 4972

Trending Articles