Force QWebView to download web page content in a separate thread?

耗尽温柔 提交于 2019-12-10 17:47:19

问题


How can i force QWebView into downloading the webpage and related content in a separate thread?


回答1:


You cannot easily. You could implement your own QNetworkAccessManager (see createRequest()) that offloads the work to a QNetworkAccessManager in another thread.

What is your exact problem? Maybe it can be solved differently or a bug to Qt can be reported?




回答2:


That's now the default behaviour so you can just relax and watch :)
See Qt Earth Team Mix Feb 2011 and Threading support for QNetworkAccessManager




回答3:


Why do you see a problem in having a QWebView loading content at the main thread? I mean, the main thread won't be locked at all if you do this.

You can have a hidden QWebView loading content and just when it has finished you show it.

Maybe you should describe your problem/idea a little bit more to help us help u.



来源:https://stackoverflow.com/questions/3931909/force-qwebview-to-download-web-page-content-in-a-separate-thread

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!