PDA

View Full Version : How to clear history in QWebView



jimc1200
29th June 2009, 23:38
I created a simple application using QDesigner with QWebView widget. Looking at the code generated by QDesigner , it's loading a default "blank" html page.
Now I want to load my own html and would like it to be the FIRST page without any previous(back navigation) document. This doesn't seem to work because of the previous html loaded by QDesigner code. I'm always getting a document for the back navigation. I tried to clear the QWebView history using the below code but it didn't work:


ui.webView->history()->clear();

I tried loading the new html with load() and setUrl() methods with the same results.

I'm not sure if this a bug, I'm using Qt 4.4.3.
Thanks for any help.

lucenty
9th August 2009, 16:02
I have exactly the same problem. Has anybody any idea how to solve it?