QtCreator: how to remove white background from section headers in Help when dark theme is used?



  • I use Dark theme (set in Tools -> Environment -> Theme). When I open any Help article in QtCreator, the background of the article is dark, but section headers inside the article remain almost white (#F2F3F4, obtained with a color picker) as if light theme was used, which is very irritating for the eyes and requires a darker font color to make text visible on white background. For example, the first two sections in the article for QObject, "Properties" and "Public functions", visually appear as white when the dark theme is on.
    To change the font color of the article I can run qtcreator with "-stylesheet font.css" argument and the following code in font.css:

    QWidget
    {
    font-size: 12pt;
    color: grey;
    }
    

    But is there a way to change the background color of the section headers via font.css too? Or is there any other way to do this?
    By running "find -name *.css | xargs grep F2F3F4" in Qt5.8.0/Docs I can see that this color is used as a "background-color" css property for h2 and p.h2 tags in nearly 100+ offline.css/offline-simple.css files in docs for various Qt modules. Theoretically, I could try to change this value to a darker value in all these files, recompile the qch files and import them to QtCreator, but isn't it an overkill for the task?
    I use QtCreator 4.2.1 and Qt 5.8, but I had the same issue with older Qt/QtCreator versions too.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.