Calling a Qt function from the Javascript side (QWebView)

前端 未结 2 1924
借酒劲吻你
借酒劲吻你 2020-12-30 04:32

I have a Qt project that can load any HTML page into a web view. I have the following code in main.cpp file:

#include \"mainwindow.h\"
#include          


        
2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-30 05:23

    Current accepted answer is outdated because Qt moved to WebEngine.

    For WebEngineView the solution for calling Qt from JS is using Qt WebChannel API

提交回复
热议问题