Question

If it doesn't, then how can I explicitly force it to download asynchronously in a separated thread?

Was it helpful?

Solution

According to the documentation for QWebView::setHtml():

Sets the content of the web view to the specified html.
External objects such as stylesheets or images referenced in the HTML document are located relative to baseUrl.
The html is loaded immediately; external objects are loaded asynchronously.

Same thing goes for QWebView::setContent(). Therefore, the raw HTML is loaded in the main thread, and any other references (images, stylesheets, etc.) are loaded asynchronously in a separate thread.

From experience, I can tell that QWebView::setUrl() also loads asynchronously, using a network manager to wait for the raw HTML, which will in turn load the other references, also asynchronously. As far as I know, there is no way to force QWebView to act sychcronously.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top