Unsolved Access WebEngineView from C++
-
Hi there,
How can i access QML based WebEngineView from C++? I want to do that so i can do my UI in QML while do business logic in C++ with direct access to WebEngineView.
Please advise
Thanks -
Hi,
I found the answer here:
https://stackoverflow.com/questions/21133817/access-qml-webview-from-cIn short:
In the .pro file:
QT += quick quick-private webengine webengine-private webenginecore webenginecore-privateIn the qml file:
WebEngineView {
id: webEngineView
objectName: "webEngineView"In the c++ file:
QQuickWebEngineView webEngineView = view.rootObject()->findChild<QQuickWebEngineView>("webEngineView");