Results 1 to 3 of 3

Thread: QWebView - change missing image icon

  1. #1
    Join Date
    Aug 2008
    Posts
    50
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QWebView - change missing image icon

    Hello,

    how can I change default missing image icon in QWebView when resource not loaded?

    Default missing image icon:
    missing_image_icon.png

  2. #2
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QWebView - change missing image icon

    Did you try
    Qt Code:
    1. void setIcon(const QIcon & icon)
    To copy to clipboard, switch view to plain text mode 

    Bala

  3. #3
    Join Date
    Aug 2008
    Posts
    50
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QWebView - change missing image icon

    Quote Originally Posted by BalaQT View Post
    Did you try
    Qt Code:
    1. void setIcon(const QIcon & icon)
    To copy to clipboard, switch view to plain text mode 
    I didn't try. Where I can find setIcon function? I'm using Qt 4.8.4.
    I do not mean 'favicon'.

    I want change fallback image which is displayed when eg. image not loaded (because HTTP 403 error or other).
    Qt Code:
    1. QWebView web_view = /*...*/
    2. web_view.setHtml("<img src='http://www.example.com/notexist.png'>");
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. QTabWidget missing icon in current tab OS X
    By mrazvan in forum Qt Programming
    Replies: 0
    Last Post: 26th March 2013, 11:06
  2. Custom Icon Missing from Window Menu Bars
    By masher in forum Qt Programming
    Replies: 1
    Last Post: 19th September 2012, 03:48
  3. Tray icon is missing on some systems.
    By eurodatar in forum Qt Programming
    Replies: 2
    Last Post: 16th February 2011, 01:39
  4. QMessageBox missing icon
    By zanth in forum Qt Programming
    Replies: 3
    Last Post: 8th July 2010, 22:20
  5. Replies: 2
    Last Post: 7th April 2006, 14:31

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.