特定格式的配置变量

格式特定配置变量定义生成文档的样式,或定义文档页脚或页眉的内容。

有些配置值只与 HTML 输出格式相关,其值包含原始 HTML。

HTML.footer 变量定义生成的 HTML 文档的页脚内容。

页脚位于生成文档页面的底部。

变量值以原始 HTML 代码的形式给出,并用引号括起来。需要注意的是,如果该值跨越多行,则每行都需要用引号括起来。

HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
              ...
              "</tr></table></div></address>"

<FORMAT>.nosubdirs

布尔值,当true 时,启用单目录输出模式;所有生成的文件都进入FORMAT.outputsubdir目录,而不是根据文档项目名称选择子目录。

<FORMAT>.outputsubdir

定义outputdir下生成文档的子目录。

HTML.nosubdirs = true
HTML.outputsubdir = html

在上述情况下,输出到<outputdir>/html.

HTML.postheader

HTML.postheader 变量定义生成的 HTML 文档的后页眉内容。

该页眉位于生成文档页面的顶部。

变量值以原始 HTML 格式给出,并用引号括起来。需要注意的是,如果该值跨越多行,则每行都需要用引号括起来。

HTML.postheader = "<table border=\"0\"..." \
                  ...
                  "<img src=\"images/qt-logo.png\" \
                  "align=\"right\" width=\"203\" height=\"32\""\
                 "border=\"0\" />" \
                  "</td></tr>" \
                  "</table>"

qtgui.qdocconf中的完整变量条目提供了Qt GUI 文档的标准页眉。

<FORMAT>.引用信息

一个布尔值,当true 时,会生成对引用内容的引用(例如,\quotefromfile和 \snippet命令),而不是直接包含内容。

目前用于WebXML 输出格式。

WebXML.quotinginformation = true

HTML.style

HTML.style 变量定义生成的 HTML 文档的样式。

变量值以原始 HTML 格式给出,并用引号括起来。需要注意的是,如果值跨越多行,则每行都需要用引号括起来。

HTML.style = "h3.fn,span.fn" \
             "{ margin-left: 1cm; text-indent: -1cm; }\n" \
             "a:link { color: #004faf; text-decoration: none }\n" \
             "a:visited" \
             "{ color: #672967; text-decoration: none }\n" \
             "td.postheader { font-family: sans-serif }\n" \
             "tr.address { font-family: sans-serif }\n" \
             "body { background: #ffffff; color: black; }"

HTML 样式表

HTML.stylesheets 变量定义了用于生成 HTML 文档的样式表列表。

为文档使用单独的样式表,可以在生成内容后更容易地定制和尝试所使用的样式。通常情况下,只需为任何文档集定义一个样式表,例如

HTML.stylesheets = path/to/classic.css

QDoc 预计会在包含qtgui.qdocconf文件的目录中找到样式表,并将指定的样式表复制到输出目录中的 HTML 页面。

<FORMAT>.tocdepth

<FORMAT>.tocdepth 变量定义在目录中打印多少文档部分。将 tocdepth 设为0 会禁用目录,而未定义则会打印所有文档部分。

目前仅对 HTML 格式有效:

HTML.tocdepth = 3

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.