매니페스트 파일 예시
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 예제에는 추가 태그가 추가되고, *
만 일치 문자열로 사용하여 모든 예제에 다른 태그가 적용됩니다.
© 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.