DataManager
is a class and I can access this in QML by below code (Qt version 5.8.0).
DataManager *d = new DataManager;
QQuickView *viewver = new QQuickView;
viewver->rootContext()->setContextProperty("dataManager", d);
Now in QML I created a WebEngineView
and here I am loading a local HTML file which is running fine.
WebEngineView{
id : webEnginView
anchors.fill: parent
url : dataManager.htmlURL();
}
Now I want to access dataManager
value in JavaScript code of loaded HTML file. Thanks in advance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…