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

brook.hong at nokia.com brook.hong at nokia.com
Fri Apr 1 19:23:35 PDT 2011


Great thanks to you two guys, it works perfectly.


----------------
Best Regards,
Brook Hong 

>-----Original Message-----
>From: ext Ariya Hidayat [mailto:ariya.hidayat at gmail.com]
>Sent: Friday, April 01, 2011 11:04 PM
>To: Hong Brook (Nokia-MS/Beijing)
>Cc: webkit-qt at lists.webkit.org
>Subject: Re: [webkit-qt] how to load image from QImage in QWebView?
>
>> 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.
>>
>> I have customized WebPage::acceptNavigationRequest,
>
>That's definitely not how you do it. See Noam's example:
>http://labs.qt.nokia.com/2010/11/16/some-webkit-hybrid-stuff/ for the
>proper way to implement this idea.
>
>
>--
>Ariya Hidayat
>http://www.linkedin.com/in/ariyahidayat


More information about the webkit-qt mailing list