[Qt-interest] Loading resources in WebView? (WebKit)

Tony Rietwyk tony.rietwyk at rightsoft.com.au
Tue Mar 24 00:53:32 CET 2009


Hi Stefan, 
 
Webkit is much more complicated, because resource requests are pipelined
using signals/slots.  I achieved a similar result by:
 
- overiding QNetworkReply to read content from a database. 
- you must NOT signal the finished/error in the reply constructor - use a
singleshot 0 timer to signal it later - so clients can connect to the
signals. 
- overiding QNetworkAccessManager.createRequest to check for protocol "qdb:"
and returning the network reply from above. 
- pass the manager object to QWebPage.setNetworkAccessManager.
 
It works quite well. 
 
Hope that helps, 
 
Tony Rietwyk
 
 


Hi,
 
I'm using QTextBrowser to display some html mail messages. I inherit a class
from it and redefine
virtual QVariant loadResource ( int type, const QUrl & name )
to load the inline images from the email ala <img
src="cid:131095406 at 01122008-1CBD"> which are in a different part of the
message.
 
Now I'd like to use WebView instead of QTextBrowser but I can't find any
method that could be used for this purpose. 
 
Any ideas?
 
Stefan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090324/0b1e272b/attachment.html 


More information about the Qt-interest-old mailing list