문서 탐색
이 탐색 명령어는 문서 내의 페이지들을 논리적인 순서대로 연결하는 데 사용됩니다. 아래는 탐색 명령어의 일반적인 사용 예를 보여주는 일련의 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 (link) 명령어와 마찬가지로, \tocentry 는 생성된 목차 항목에서 사용자에게 표시될 제목을 지정하는 선택적 두 번째 인수를 받습니다.
/*!
\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 명령을 하나만 사용할 수 있습니다.
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.