QWebView not loading external javascript?

后端 未结 3 979
失恋的感觉
失恋的感觉 2021-01-16 05:51

It is possible to load an external javascript file from the html using QWebView?

In the following QtProject (all files in the same directory) there is javascript cod

3条回答
  •  温柔的废话
    2021-01-16 06:31

    Actually you can. You just need to add file:// at the begining of your src.

    file:///home/js/somejs.js
    

提交回复
热议问题