I have to capture a event dispatched from webpage with JavaScript, and then connect it to a slot in my MainWindow class. Something aproaching to that:
QWebEngineView *view;
view->load(QUrl("https://test.com/"));
connect(view->my_element, &DOMElement::hover, this, &MainWindow::elementHovered);
What is the most algorithmic way to do it in C++?
If you want to track the events of some element of the DOM and notify about it to a C++ element then you must use Qt WebChannel: