问题
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