Results 1 to 6 of 6

Thread: For help: Image does not update in QWebView

  1. #1
    Join Date
    Dec 2008
    Posts
    68

    Angry For help: Image does not update in QWebView

    Hi,

    I am put a QWebView in a dialog window and use QWebView to display the html file which has images.

    Each time, there is any change in html file, I use setContent(...) to update QWebView and use the show() to display it.

    The problem is that the text is updated in display, but the images are still the same even though the image's content has changes ( filename is still the same.). I have to close the applcation and restart it so that the Qwebview can display correctly. I used function reload(), but it doesn't help.

    Can anyone give some help or let me know how to force it to refresh? I ever used the right mouse click menu "reload" on QWebview, it did not help either.

    Thank you!
    Richard

  2. #2
    Join Date
    Dec 2008
    Posts
    68

    Default Re: For help: Image does not update in QWebView

    Can anyone help?

    Thank you!

  3. #3
    Join Date
    Dec 2008
    Posts
    68

    Default Re: For help: Image does not update in QWebView

    Any comment is appreciated!

    Thank you!

  4. #4
    Join Date
    Jul 2009
    Posts
    139
    Thanks
    13
    Thanked 59 Times in 52 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: For help: Image does not update in QWebView

    Assuming you're using 4.6, try:
    Qt Code:
    1. webView->triggerPageAction(QWebPage::ReloadAndBypassCache);
    To copy to clipboard, switch view to plain text mode 

  5. #5
    Join Date
    Dec 2008
    Posts
    68

    Default Re: For help: Image does not update in QWebView

    I am using Qt 4.5. I seem to have to upgrade Qt if this is true.

    Is there any other possible reasons?

    Thank you!

  6. #6
    Join Date
    Nov 2011
    Posts
    1
    Qt products
    Platforms
    Unix/X11

    Default Re: For help: Image does not update in QWebView

    I have the same problem and i tried:
    Qt Code:
    1. webView->triggerPageAction(QWebPage::ReloadAndBypassCache);
    To copy to clipboard, switch view to plain text mode 
    but it doesn't work.
    Does anyone found a solution on this? Any help is appreciated!

    Thank you

Similar Threads

  1. QWebView and image scaling
    By naresh in forum Qt Programming
    Replies: 1
    Last Post: 25th November 2010, 03:38
  2. how to update image??
    By sudhansu in forum Qt Programming
    Replies: 1
    Last Post: 23rd December 2009, 08:37
  3. Replies: 6
    Last Post: 21st September 2009, 10:55
  4. hide image,once moused moved from image
    By yuvaraj.yadav in forum Qt Programming
    Replies: 1
    Last Post: 22nd April 2009, 08:16
  5. Replies: 3
    Last Post: 14th March 2007, 08:09

Bookmarks

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.