このページについて

ドキュメントの構造

ドキュメント構造化コマンドは、ドキュメントをセクションに分割するためのものです。QDocでは、\section1 、\section2 、\section3 、\section4 の4つのレベルのセクションをサポートしています。これらのセクションコマンドは、アウトライン作成で用いられる従来の「セクション」「サブセクション」などに相当します。

セクションコマンド

一般的に、文書構造指定コマンドは、その直後に続く内容(最初の改行まで)をすべて引数として扱います。この引数は、そのセクションのタイトルとして表示されます。タイトルを複数行にまたがって表示する必要がある場合は、各行(最後の行を除く)の末尾にバックスラッシュを付けるようにしてください。

QDocでは、セクションには計4つのレベルがあります:\section1 、\section2 、\section3 、\section4 。これらは、従来のセクション、サブセクション、サブサブセクション、サブサブサブセクションに対応しています。

セクション単位には厳格な順序があります:

section1
      |
      section2
             |
             section3
                    |
                    section4

セクションを使用する場合、最初のセクションコマンドはsection1 である必要があります。

/*!
    \section1 Basic Qt

    This is the first section.


        \section2 Getting Started

        This is the first subsection.


            \section3 Hello Qt

            This is the first subsubsection.


            \section3 Making Connections

            This is the second subsubsection.


            \section3 Using the Reference Documentation

            This is the third subsubsection.


        \section2 Creating Dialogs

        This is the second subsection.


            \section3 Subclassing QDialog

            This is the first subsubsection.

            ...


    \section1 Intermediate Qt

    This is the second section.


        \section2 Layout Management

        This is the second section's first subsection.


            \section3 Basic Layouts

            This is the first subsubsection.

        ...
*/

各セクションは、文書における論理的な単位となります。セクションの見出しは、通常ページの右上隅に表示される自動生成の目次に表示されます。

\section1

\section1 コマンドを実行すると、新しいセクションが開始されます。

各種セクション単位、コマンドの引数、および表示方法については、「セクションコマンド」を参照してください。

\section2

\section2 コマンドは、新しいセクションを開始します。

各種セクション単位、コマンドの引数、および表示方法については、「セクションコマンド」を参照してください。

\section3

\section3 コマンドは、新しいセクションを開始します。

各種セクション単位、コマンド引数、およびレンダリングに関する説明については、「セクションコマンド」を参照してください。

\section4

\section4 コマンドは、新しいセクションを開始します。

各種セクション単位、コマンド引数、および表示に関する説明については、「セクションコマンド」を参照してください。

© 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.