Altinsystems
Altinsystems

Reputation: 356

QWebview: Turn off loading images at QWebview qt

Is there any way to prevent the loading of images with the QWebview in qt?

I load with the QWebview a page with a lot of pictures, so it takes a long time until the page has fully loaded. But I only need the text below the pictures, but I have to wait until the pictures have loaded. Is there any way to prevent loading the images?

Upvotes: 1

Views: 171

Answers (1)

Simon
Simon

Reputation: 1590

QWebSettings has an attribute for autoloading images. it's enabled by default so you will have to disable it.

poWebView->page()->settings()->setAttribute(
                    QWebSettings::AutoLoadImages,false);

Upvotes: 2

Related Questions