On Wed, Sep 28, 2016 at 3:42 AM, Eike Ziller <[email protected]> wrote:

>
> > On Sep 28, 2016, at 8:41 AM, Mohammad Mirzadeh <[email protected]>
> wrote:
> >
> > Hi Folks,
> >
> > I am trying to build a custom qch for a library that already comes with
> html docs. I have noticed a weird issue. The doc pages use <body
> bgcolor="FFFFFF"> tag but when imported in Qt Creator, the background color
> is rendered as black. I can fix this by changing the tag to <body
> bgcolor="#FFFFFF">. Obviously I don't want to change lots of html files.
> >
> > Quite interestingly Qt Assistant does render the correct background
> color. Any ideas what might be causing this and how to fix it?
>
> My guess would be that you used Qt Assistant from Qt < 5.6, which still
> had a QtWebKit based help viewer?
> Qt Creator uses QTextBrowser since it is built with Qt >= 5.6 where
> QtWebKit is no longer available. QTextBrowser is not a full-fledged html
> renderer (though, hex color values without leading # are actually not part
> of the standard, are they?).
>
I think that might be it; the Qt Assistant is an older version


> I mostly see two ways out:
>
> 1. Build Qt Creator yourself against a Qt with the QtWebEngine module
> installed. There is a web engine based backend in Qt Creator, but it is not
> included by default. Doesn’t really help if you want to distribute your qch
> to others who did not do that.
> 2. Pre-process the html files before creating the qch. Shouldn’t be hard
> to replace bgcolor=“......” by bgcolor=“#......” recursively in all html
> files with sed or some other tool.
>
> A longer term 3.: Fix QTextBrowser to accept the colors without leading #
> ;)
>
> Br, Eike
>
> Thanks Eike. I think for now I'm going to use sed. I was hoping to avoid
it, since I was thinking of shipping the qhp upstream without having to
mess with html files (that are in turn generated by another script ...).
Maybe I should ask them to fix the hex values in their script ...

Best,
Mohammad

> > Thanks,
> > Mohammad
> >
> >
> > _______________________________________________
> > Qt-creator mailing list
> > [email protected]
> > http://lists.qt-project.org/mailman/listinfo/qt-creator
>
> --
> Eike Ziller
> Principal Software Engineer
>
> The Qt Company GmbH
> Rudower Chaussee 13
> D-12489 Berlin
> [email protected]
> http://qt.io
> Geschäftsführer: Mika Pälsi, Juha Varelius, Tuula Haataja
> Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht
> Charlottenburg, HRB 144331 B
>
>
>
>
>
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qt-creator

Reply via email to