PDA

View Full Version : QWebView Images with UNC path not working



michael.
10th December 2010, 11:10
In the following application:



#include <QApplication>
#include <QHBoxLayout>
#include <QWebView>

int main(int argc, char* argv[])
{
QApplication app(argc, argv);
QWidget *window = new QWidget();

window->setLayout(new QHBoxLayout());
window->resize(800, 600);
window->show();

QWebView *webView = new QWebView(window);
window->layout()->addWidget(webView);

webView->load(QUrl("C:/test.html"));

return app.exec();
}

where test.html is:



<html>
<head></head>
<body>
<img src="file://///SERVER/path/image.png">
<img src="file:///C:/test.png">
</body>
</html>


Qt 4.5.1 shows me nothing at all (Not even the "image missing" images).
Qt 4.7.1 show me the local file ("test.png"), but an "image missing" image for the file on the network share.

The html file loads fine with both images in Firefox, Chrome and IE.

What could be the problem here? Are the URLs correct? Could it be an issue with access rights? I'm really out of ideas, any help would be much appreciated.

Thanks
Michael

jh
2nd March 2012, 09:46
same problem here!
any ideas anyone?

best regards,
jh