[webkit-qt] how to load image from QImage in QWebView?

Benjamin Poulain benjamin.poulain at nokia.com
Fri Apr 1 04:18:44 PDT 2011

On 04/01/2011 12:04 PM, ext brook.hong at nokia.com wrote:
> QWebView* webView;
> webView->setPage(new WebPage);
> webView->setHtml("<html> <head> </head> <body> <img
> src='mydata://test.png'> </body> </html>");
> The test.png was read into an instance of QImage from database.
> The problem is how to make test.png displayed in the webView.

Why not making a subclass of QNetworkAccessManager to handle you own 
scheme by loading the data from the database?

This is the way the benchmark loads data, you should have a look at 
It is probably close to your use case.


More information about the webkit-qt mailing list