qtqtwebkit

QTWebview does not load image from css


I am using QTWebview in a window application. When I load a page by setHtml function, my web view sometimes does not load content images.
This problem especially occur after several pages are loaded.

I am sure that this is an issue of QTWebview because my page is loaded completely in browsers.

I have embed Fire bug and have found something. The QTWebview actually does not load new css file. For example, I have 2 css files. Firstly, I copy 1st file into stylesheet folder and load the web. And then, I copy 2nd file into stylesheet and force webview reload. No thing happen. All css items in fire bug are the same with the first, the apperance has no change. I think QTWebview auto cache data for reload but can find any solution for that. Does anyone have the same problem like me???


Solution

  • I finally found the solution for this issue. Because I alway load the same URL and change style sheet only,QWebview auto use it's cache data. I fixed it by adding QWebSettings::clearMemoryCaches(); before reload.