文書構造

文書構造化コマンドは文書をセクションに分割するためのものです。QDocは4つのレベルのセクションをサポートしています:\section1 \section2 \section3 \section4 。セクションコマンドはアウトラインで使われる伝統的なセクション、サブセクションなどに対応します。

セクションコマンド

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

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.

        ...
*/

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

\セクション1

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

様々なセクション単位、コマンド引数、レンダリングについての説明はセクションコマンドを参照してください。

\セクション2

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

様々なセクション単位、コマンド引数、レンダリングについての説明はセクションコマンドを参照してください。

\セクション3

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

様々なセクション単位、コマンド引数、レンダリングについての説明はセクションコマンドを参照してください。

\セクション4

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

様々なセクション単位、コマンド引数、レンダリングについての説明はセクションコマンドを参照してください。

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