PDA

View Full Version : QTextDocument::addResource in QWebView



NullPointer
24th July 2011, 20:15
Hi all,

I'm developing an knowledge-database application using Qt an MySql. The users can add articles with sections and images.
Currently I'm using QTextBrowser, and, since the images come from the MySql, I search <img src="image:/(keyword)"> and do an QTextBrowser::document()::addResource() to insert the correct image in the container.

It's all working, but I'll have to change QTextBrowser by an QWebView, once QTextBrowser doesn't support full css and javascript.

Now, how can I change the request by and image for an image in my database using QWebKit?

PS: I'll need to convert it to PDF, if the users ask for that...

Thanks in advance.

NullPointer
27th July 2011, 03:04
It was hard to find, but i found it... :o

http://doc.qt.nokia.com/qq/32/qq32-webkit-protocols.html

This shows how to use a QWebView to show contents from an ftp site (not supported natively).