PDA

View Full Version : QWebView and Favicons



Jick
24th March 2010, 05:19
I have a QWebView in my app. Inside this QWebView I have an HTML page which has a list of websites and some details about those sites. Next to each site I want to display the favicon of that website. This works in Webkit. However, in my QWebView the icons don't show. It just shows the alt text for the icons. I'm using an <img> tag to try to display the favicons. I do have QWebSettings::LocalContentCanAccessRemoteUrls set on the QWebView so that isn't the issue.

I would greatly appreciate any help on this issue. Thanks!

Jick
25th March 2010, 03:14
Anyone got any ideas?

Jick
27th March 2010, 08:33
Nothing..?

wysota
27th March 2010, 15:48
Please provide some code you have written to do that. It's hard to discuss the situation without it.

kompotFX
16th April 2010, 10:39
QtWebKit I guess it is qt releated.
2 topicpaster: actually you have to use documented function:
QIcon QWebSettings::iconForUrl ( const QUrl & url ) [static]
Returns the web site's icon for url.

If the web site does not specify an icon, or the icon is not in the database, a null QIcon is returned.

Note: The returned icon's size is arbitrary.

See also setIconDatabasePath().

Unfortunatelly in 4.6 qtwebkit it wont work from some strange reasons. Some one from qt team broke it, I guess.
http://bugreports.qt.nokia.com/browse/QTWEBKIT-97