特定格式的配置变量
格式特定配置变量定义生成文档的样式,或定义文档页脚或页眉的内容。
有些配置值只与 HTML 输出格式相关,其值包含原始 HTML。
HTML.footer
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 文档的后页眉内容。
该页眉将在生成的文档页面顶部呈现,紧接在打开的<body> 元素之后。
变量值以原始 HTML 格式给出,并用引号括起来。需要注意的是,如果该值跨越多行,则每行都需要用引号括起来。
在呈现HTML.postheader 的内容后,QDoc 会将页面的面包屑导航输出为一组<li> 元素。因此,postheader 必须以<li> 的有效父元素结尾,如<ul> 。HTML.postheader 的默认值是
HTML.postheader = "<ul class=\"breadcrumb\">\n"
HTML.postostheader
HTML.postpostheader 变量定义了关闭 HTML 文档的后页眉及其包含的导航面包屑项目列表的内容。其值必须包括在 HTML.postheader.
HTML.postpostheader 的默认值是
HTML.postpostheader = "</ul>\n"
<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
© 2026 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.