도움말 프로젝트 파일 생성
개요
Qt Assistant 는 파일 목록을 생성하기 위해 QDoc이 필요한 Qt 문서 관리 시스템을 사용합니다.
QDoc에서는 구성 변수를 사용하여 생성되는 각 문서 세트에 포함될 페이지를 지정할 수 있습니다. 이러한 변수는 qhp 변수의 하위 변수로 지정되며, 각 세트는 고유 식별자를 하위 변수로 사용하여 선언됩니다.
예를 들어, Qt Quick 문서 세트의 구성 파일은 qhp.QtQuick 접두사를 가진 하위 변수로 해당 세트에 대한 정보를 지정합니다.
qhp.projects = QtQuick
qhp.QtQuick.file = qtquick.qhp
qhp.QtQuick.namespace = org.qt-project.qtquick.$QT_VERSION_TAG
qhp.QtQuick.virtualFolder = qtquick
qhp.QtQuick.indexTitle = Qt Quick
qhp.QtQuick.indexRoot =
qhp.QtQuick.subprojects = qmltypes classes examples
qhp.QtQuick.subprojects.qmltypes.title = QML Types
qhp.QtQuick.subprojects.qmltypes.indexTitle = Qt Quick QML Types
qhp.QtQuick.subprojects.qmltypes.selectors = qmltype
qhp.QtQuick.subprojects.qmltypes.sortPages = true
qhp.QtQuick.subprojects.classes.title = Classes
qhp.QtQuick.subprojects.classes.title = C++ Classes
qhp.QtQuick.subprojects.classes.indexTitle = Qt Quick C++ Classes
qhp.QtQuick.subprojects.classes.selectors = class headerfile
qhp.QtQuick.subprojects.classes.sortPages = true
qhp.QtQuick.subprojects.examples.title = Examples
qhp.QtQuick.subprojects.examples.indexTitle = Qt Quick Examples and Tutorials
qhp.QtQuick.subprojects.examples.selectors = example문서 세트에는 하나 이상의 하위 프로젝트가 포함될 수 있으며, 이러한 하위 프로젝트는 title 로 지정된 이름 아래 목차에 추가됩니다. indexTitle 가 참조하는 문서 내 페이지는 해당 하위 프로젝트의 색인 페이지 역할을 합니다. 하위 프로젝트 아래에 나열할 페이지 유형은 selectors 로 지정됩니다. sortPages 가 true 로 설정된 경우 항목은 알파벳순으로 정렬됩니다.
선택자 사용
selectors 속성은 하위 프로젝트의 목차 항목 아래에 나열될 페이지 유형을 지정합니다. 공백으로 구분하여 여러 선택자를 나열할 수 있습니다.
참고: 하위 프로젝트에 selectors 속성이 정의되어 있지 않은경우 , 기본적으로 프로젝트의 모든 페이지가 포함됩니다.
| 선택자 | 설명 |
|---|---|
namespace | 네임스페이스 |
class | 클래스 |
example | 예 |
externalpage | 외부 페이지 항목 |
function | 함수 |
headerfile | 헤더 파일 |
page | 개요 페이지 |
property | C++ 속성 |
typedef | C++ typedef 유형 |
typealias | C++ 유형 별칭 |
variable | C++ 변수 |
qmlproperty | QML 속성 |
qmltype | QML 유형 |
qmlvaluetype | QML 값 유형 |
module[:name] | C++ 모듈 또는 지정된 이름을 가진 모듈의 멤버. |
qmlmodule[:name] | 지정된 이름을 가진 QML 모듈 또는 모듈의 멤버. |
group[:groupname] | `groupname` 명령어를 사용하여 추가된, 지정된 그룹의 구성원에 대한 문서 페이지. \ingroup groupname 명령어를 사용하여 추가된, 지정된 그룹의 멤버에 대한 문서 페이지. 여러 그룹 이름은 쉼표로 구분된 목록 형태로 나열할 수 있습니다. |
none | 아무것도 선택하지 않으며, indexTitle 에 대한 링크만 생성됩니다. (QDoc 6.9에서 도입됨). |
예를 들어, 다음 구성은 예제 페이지와 \ingroup tutorials 명령을 포함하는 페이지를 선택합니다:
qhp.QtQuickControls.subprojects = examples
qhp.QtQuickControls.subprojects.examples.title = Examples and Tutorials
qhp.QtQuickControls.subprojects.examples.indexTitle = Qt Quick Controls Examples
qhp.QtQuickControls.subprojects.examples.selectors = example group:tutorials
qhp.QtQuickControls.subprojects.examples.sortPages = true목차 추가
매뉴얼의 목차를 생성하려면, type 속성을 가진 하위 프로젝트를 생성하고 이를 manual 로 설정하십시오. indexTitle 속성이 참조하는 문서 내의 페이지에는 전체 매뉴얼의 목차 역할을 하는 링크 목록이 포함되어 있어야 합니다. QDoc은 이 목록의 정보를 활용하여 하위 프로젝트에 대한 목차를 생성합니다.
예를 들어, Qt Creator 의 구성 파일은 문서에 대한 하위 프로젝트를 단 하나만 정의하며, 모든 문서를 단일 매뉴얼에 포함합니다:
qhp.QtCreator.subprojects = manual
qhp.QtCreator.subprojects.manual.title = Qt Creator Manual
qhp.QtCreator.subprojects.manual.indexTitle = All topics
qhp.QtCreator.subprojects.manual.type = manual이 예제에서 "모든 주제(All topics)"라는 제목의 페이지에는 문서 내 페이지로 연결되는 중첩된 링크 목록이 포함되어 있으며, 이 목록은 Qt Assistant 의 '목차(Contents)' 탭에 동일하게 표시됩니다.
이러한 목록 구조의 예는 다음과 같습니다:
/*!
\page qtcreator-toc.html
\title All topics
\list
\li \l {Installation}
\li \l {Getting started}
\list
\li \l {Configuring Qt Creator}
\li \l {Building and running an example}
\endlist
\li \l {Overview}
\li \l {Tutorials}
\generatelist tutorials
...
\endlist
*/위 예시에서 ‘ 시작하기( Getting started )’ 항목에는 두 개의 페이지가 하위 항목으로 있습니다. ‘튜토리얼(Tutorials )’ 항목은 \group 페이지이며, \generatelist 명령은 개별 튜토리얼 페이지( tutorials 그룹의 구성원)를 하위 주제로 나열하는 데 사용됩니다.
© 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.