매니페스트 파일 예시
QDoc은 문서화된 모든 예제에 대한 정보가 포함된 example-manifest.xml 파일을 생성합니다. 이 파일들은 Qt Creator 에서 환영 화면에 예제 목록을 표시하고 해당 문서로 연결하는 데 사용됩니다.
매니페스트 XML 구조
매니페스트 파일의 구조는 다음과 같습니다:
<?xml version="1.0" encoding="UTF-8"?>
<instructionals module="QtGui">
<examples>
<example
name="Analog Clock Window"
docUrl="qthelp://org.qt-project.qtgui.502/qtgui/analogclock.html"
projectPath="gui/analogclock/analogclock.pro"
imageUrl="qthelp://org.qt-project.qtgui.502/qtgui/images/analogclock-window.png">
<description><![CDATA[The Analog Clock Window example shows how
to draw the contents of a custom window.]]></description>
<tags>analog,clock,window</tags>
<fileToOpen>gui/analogclock/main.cpp</fileToOpen>
</example>
...
</examples>
</instructionals>각 ` <example> ` 요소에는 이름, 설명, 프로젝트 파일 및 문서의 위치에 대한 정보와 예제와 관련된 태그 목록이 포함됩니다.
매니페스트 메타 콘텐츠
manifestmeta 구성 명령어를 사용하여, 선택된 예제에 대한 추가 속성 및 태그와 같은 메타 콘텐츠를 매니페스트 파일에 추가할 수 있습니다.
메타 콘텐츠의 사용 사례 중 하나는 주목할 만한 예제를 강조하는 것입니다. 또 다른 사례는 특정 범주의 예제에 관련 키워드를 태그로 추가하여 검색 기능을 개선하는 것입니다.
메타 콘텐츠가 적용될 예제는 하나 이상의 필터를 사용하여 지정합니다. 필터와 예제의 일치 여부는 이름을 기준으로 판단되며, 각 예제 이름의 앞에는 모듈 이름과 슬래시가 붙습니다. 간단한 와일드카드 일치 기능이 지원되며, 끝에 * 를 사용하면 단일 문자열로 여러 예제를 일치시킬 수 있습니다.
예시:
manifestmeta.filters = highlighted sql webkit global
manifestmeta.highlighted.names = "QtGui/Analog Clock Window" \
"QtWidgets/Analog Clock"
manifestmeta.highlighted.attributes = isHighlighted:true
manifestmeta.sql.names = "QtSql/*"
manifestmeta.sql.tags = database,sql
manifestmeta.webkit.names = "QtWebKitExamples/*"
manifestmeta.webkit.tags = webkit
manifestmeta.global.names = *
manifestmeta.global.tags = qt6위 예시에서는 두 예시에 isHighlighted 속성이 추가되었습니다. 속성 값을 생략하면 QDoc은 기본적으로 true 문자열을 사용합니다. Qt WebKit 및 Qt SQL 예시에는 추가 태그가 추가되며, * 을 일치 문자열로만 사용하여 모든 예시에 또 다른 태그가 적용됩니다.
© 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.