문서 탐색
탐색 명령은 문서의 페이지를 의미 있는 순서로 연결하기 위한 것입니다. 아래는 탐색 명령의 일반적인 사용법을 보여주는 일련의 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 파일에 포함하지만 문서에 시각적인 효과는 없습니다. 생성된 링크 유형은 작성자가 컬렉션의 시작점으로 간주하는 문서를 브라우저와 검색 엔진에 알려줍니다.
\toc
\toc 및 \endtoc 명령은 명령이 표시되는 토픽의 하위 토픽(페이지) 목록을 지정합니다. 각 토픽의 TOC 항목을 기반으로 전체 문서 프로젝트에 대한 목차(TOC) 계층 구조가 생성됩니다.
\toc... \endtoc 블록 내에서 \tocentry 명령을 사용하여 제목별로 하위 주제를 지정할 수 있습니다. 처럼 \l (링크) 명령과 마찬가지로 \tocentry 명령은 생성된 TOC 항목에서 사용자가 볼 수 있는 제목에 대한 선택적 두 번째 인수를 받습니다.
/*!
\page index.html
\title Qt
...
\toc
\tocentry {Introduction to Qt} {Introduction}
\tocentry {What's new in Qt} {What's new}
\tocentry {Getting started}
\endtoc
*/\toc명령은 중첩할 수 없습니다. 그러나 각 하위 토픽은 고유한 TOC 항목을 지정할 수 있습니다. 한 토픽은 하나의 \toc 명령만 사용할 수 있습니다.
QDoc은 결과 목차 구조를 XML 형식으로 <project>_toc.xml 파일에 씁니다.
참고: 루트 주제(색인 또는 랜딩 페이지)는 프로젝트 구성에서 navigation.landingpage 또는 navigation.homepage 을 사용하여 지정해야 합니다. navigation 를 참조하세요.
\toc 명령은 Qt 6.11에서 QDoc에 도입되었습니다.
또한 \tocentry.
\tocentry
목차의 항목으로 하위 주제(페이지)를 지정합니다. \toc 및 \endtoc 명령 쌍 내에서만 사용할 수 있습니다.
\tocentry 명령은 Qt 6.11에서 QDoc에 도입되었습니다.
또한 \toc.
© 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.