文档导航
导航命令用于以有意义的顺序链接文档的页面。以下是QDoc注释的一个序列,显示了导航命令的典型使用。
示例
/*!
\page basicqt.html
\nextpage Getting Started
\indexpage Index
\startpage Basic Qt
\title Basic Qt
The Qt toolkit is a C++ class library and a set of tools for
building multiplatform GUI programs using a "write once,
compile anywhere approach".
Table of contents:
\list
\li \l {Getting Started}
\li \l {Creating Dialogs}
\li \l {Creating Main Windows}
\endlist
*/
/*!
\page gettingstarted.html
\previouspage Basic Qt
\nextpage Creating Dialogs
\indexpage Index
\startpage Basic Qt
\title Getting Started
This chapter shows how to combine basic C++ with the
functionality provided by Qt to create a few small graphical
interface (GUI) applications.
*/
/ *!
\page creatingdialogs.html
\previouspage Getting Started
\indexpage Index
\startpage Basic Qt
\title Creating Dialogs
This chapter will teach you how to create dialog boxes using Qt.
*/
/*!
\page index.html
\indexpage Index
\startpage Basic Qt
\title Index
\list
\li \l {Basic Qt}
\li \l {Creating Dialogs}
\li \l {Getting Started}
\endlist
*/\startpage命令创建一个链接到作者希望作为多页文档第一页的页面。
该链接包含在生成的HTML源代码中,但不会对文档产生视觉影响
<head> ... <link rel="start" href="basicqt.html" /> ... </head>
命令
\previouspage
\previouspage命令将当前页链接到序列中的上一页。该命令有两个参数,每个参数由大括号包围:第一个是链接目标(上一页的标题),第二个是链接文本。如果页面的标题与链接文本相同,则可以省略第二个参数。
命令必须单独位于一行上。
\nextpage
\nextpage命令将当前页链接到序列中的下一页。该命令遵循与\previouspage命令相同的语法和参数约定。
\startpage
\startpage命令指定一系列页面的第一页。该命令必须单独位于一行上,其唯一的参数是第一份文档的标题。
QDoc将生成一个链接到起始页并将其包含在生成的HTML文件中,但这在文档中不会产生视觉影响。生成的链接类型告诉浏览器和搜索引擎,作者认为哪个文档是集合的起始点。
© 2024 Qt公司。本内部文档的贡献权归其各自所有者。本提供的文档基于自由软件基金会发布的GNU自由文档许可证版本1.3的条款许可。Qt及其相关标志是芬兰的Qt公司或其他国家/地区的商标。所有其他商标归其各自所有者所有。