I have a Qt project that can load any HTML page into a web view. I have the following code in main.cpp file:
main.cpp
#include \"mainwindow.h\" #include
Current accepted answer is outdated because Qt moved to WebEngine.
For WebEngineView the solution for calling Qt from JS is using Qt WebChannel API
WebEngineView