• Add HTML Style
  • Add HTML Style

    To add the html style we need to add some html related commands to the config file

    HTML.stylesheets += style/bootstrap/bootstrap.css
    HTML.headerstyles += "<link rel='stylesheet' href='./style/bootstrap.css'>\n"

    You have to add a bootstrap css file by yourself, as this will customize the final look of your resulting documentation.
    QDoc will copy the given style the subfolder style of the html documents, so the href attribute of the <link rel='stylesheet' ... > will probably be different to the path added to the HTML.stylesheets variable
    Note, that we use for HTML.stylesheets and HTML.headerstyles += instead of = to add it to the stylesheets already added by doc-style-basics.qdocconf instead of overwriting them.

    HTML.postheader = "<div class='sidebar-root'></div>" \
                      "<div class='content-root'>"
    HTML.footer = "</div>"

    Every html file using doc-style needs exactly one `div` with the class `content-root` and one with `sidebar-root` as these will be used by the jQuery script.

    This results in the following minimalistic .qdocconf file:

    include($DOCSTYLE_DIR/doc-style-basics.qdocconf)
    
    outputformats = HTML
    outputdir = html
    
    exampledirs += manual
    
    sourcedirs += ../src
    
    headerdirs += ../include
    
    
    HTML.stylesheets += style/bootstrap/bootstrap.css
    HTML.headerstyles += "<link rel='stylesheet' href='./style/bootstrap.css'>\n"
    
    HTML.postheader = "<div class='sidebar-root'></div>" \
                      "<div class='content-root'>"
    HTML.footer = "</div>"