简体   繁体   中英

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?

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);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM