PDA

View Full Version : QWebView + img + OSx



bunjee
14th December 2009, 16:17
Hi,

I have a search.png file on my app's current directory.

this:


QWebView * web = new QWebView;

web->setHtml("<img src=\"search.png\">");

Doesn't show the picture, since 4.6.

Am I missing something ?

faldzip
14th December 2009, 16:21
Am I missing something ?
Maybe imageformats plugins?

bunjee
14th December 2009, 16:27
"file://" + fullPath seems to work.

Indeed, relative path seems to be what's broken.

bunjee
14th December 2009, 21:47
This :


QWebView * web = new QWebView;

web->setHtml("<img src=\"search.png\">", QDir::currentPath() + '/');

Works in 4.5 and not in 4.6. I'm not sure why.