Results 1 to 2 of 2

Thread: How to clear history in QWebView

  1. #1
    Join Date
    May 2008
    Qt products
    MacOS X Unix/X11 Windows

    Default How to clear history in QWebView

    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:

    Qt Code:
    1. ui.webView->history()->clear();
    To copy to clipboard, switch view to plain text mode 

    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.

  2. #2
    Join Date
    May 2009
    Qt products
    Qt4 Qt/Embedded

    Default Re: How to clear history in QWebView

    I have exactly the same problem. Has anybody any idea how to solve it?

Similar Threads

  1. How to enable cookie in QWebView
    By KoalaSydney in forum Newbie
    Replies: 5
    Last Post: 21st July 2014, 04:56
  2. Problem With QWebView
    By ivi2501 in forum Qt Programming
    Replies: 8
    Last Post: 2nd August 2009, 19:37
  3. Problems of embedded QWebView in QGraphicsView
    By naruto_9w in forum Qt Programming
    Replies: 2
    Last Post: 20th February 2009, 15:22
  4. QWebView transparent problem
    By embedyy in forum Qt Programming
    Replies: 4
    Last Post: 16th January 2009, 06:20
  5. QWebView - retrieving information?
    By lamera in forum Qt Programming
    Replies: 1
    Last Post: 25th September 2008, 17:53


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.