Access WebEngineView from C++
-
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");