ドキュメントナビゲーション
ナビゲーション・コマンドはドキュメントのページを意味のある順序でリンクするためのものです。以下は、ナビゲーション・コマンドの典型的な使い方を示す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コマンドは、現在のページを前のページにリンクします。このコマンドには2つの引数があり、それぞれ中括弧で囲まれています:1つ目はリンクターゲット(前のページのタイトル)、2つ目はリンクテキストです。ページのタイトルがリンクテキストと同じであれば、2番目の引数は省略できる。
コマンドは1行で独立していなければならない。
\次のページ
nextpageコマンドは、現在のページを次のページにリンクします。このコマンドは、"Previouspage "コマンドと同じ構文と引数の規則に従います。
\startpage
このコマンドは単独で実行する必要があります。このコマンドは、それ自身の行で独立しなければならず、その固有の引数は最初のドキュメントのタイトルです。
QDocは開始ページへのリンクを生成し、生成されたHTMLファイルに含めますが、これはドキュメントに視覚的な効果はありません。生成されたリンクタイプはブラウザと検索エンジンに、どのドキュメントがコレクションの開始点であると作者が考えているかを伝えます。
© 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.