hi

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,

bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest 
&request, NavigationType type)
{
    QString sch = request.url().scheme();
    if(sch == QLatin1String("mydata")){
        //never reach here
        QString imgName = request.url().host();
    }
    return QWebPage::acceptNavigationRequest(frame, request, type);
}


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



_______________________________________________
webkit-qt mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt

Reply via email to