Qt-interest Archive, September 2007
load external css
Message 1 in thread
Hello,
I'm working with QTextBrowser, and I would like to know if there is any way
to load an external file .css in the QTextBrowser.
Thank you
Message 2 in thread
On Tuesday 04 September 2007 12:38, Laura Lozano wrote:
> I'm working with QTextBrowser, and I would like to know if there is any way
> to load an external file .css in the QTextBrowser.
Just overload QVariant loadResource(int type, const QUrl& name) and load in
the css file within this method. loadResource will be called for each
referenced ULR in you html file. Does this help you?
Mathias
--
[ signature omitted ]
Message 3 in thread
On 9/4/07, Laura Lozano <laurloz83@xxxxxxxxx> wrote:
> Hello,
>
> I'm working with QTextBrowser, and I would like to know if there is any way
> to load an external file .css in the QTextBrowser.
>
> Thank you
>
Just fill browser content with html like this:
<html>
<head>
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
</head><body>...</body></html>
See also here:
http://doc.trolltech.com/4.3/qtextbrowser.html#searchPaths-prop
Perhabs it will be useful for you.
--
[ signature omitted ]