탭 콘텐츠

다음 매크로를 사용하여 유사 콘텐츠 또는 대체 콘텐츠가 있는 레이블이 지정된 HTML 탭의 탭 그룹을 만들 수 있습니다. 예를 들어 다양한 프로그래밍 언어에 대한 코드 조각을 표시할 수 있습니다.

탭 매크로 사용

\tab {name}{tab-id}{title}{checked}
\tabcontent {tab-id}
  content
\endtabcontent

참고: 이러한 매크로는 온라인 템플릿에서만 작동하므로 오프라인 도움말에서도 좋은 결과를 얻으려면 일반적으로 조건부 텍스트를 사용해야 합니다.

예를 들어 탭에 CMake 및 qmake 빌드 시스템에 대한 지침을 표시하는 것입니다:

\if defined(onlinedocs)
  \tab {build-qt-app}{tab-cmake}{CMake}{checked}
  \tab {build-qt-app}{tab-qmake}{qmake}{}
  \tabcontent {tab-cmake}
\else
  \section1 Using CMake
\endif
  CMake-specific instructions go here
\if defined(onlinedocs)
  \endtabcontent
  \tabcontent {tab-qmake}
\else
  \section1 Using qmake
\endif
  qmake-specific instructions go here
\if defined(onlinedocs)
  \endtabcontent
\endif

\tab

\tab {name}{tab-id}{title}{checked}

탭 그룹에서 이름, ID, 제목 및 기본 상태를 가진 탭을 지정합니다.

고유한 이름을 사용하여 탭 그룹에 속하는 탭을 지정합니다. 즉, 그룹의 모든 탭은 동일한 이름을 갖습니다. 탭을 서로 구분하려면 그룹 내에서 각 탭에 고유한 탭 ID를 부여합니다. 탭에 콘텐츠를 추가하려면 이 tab-id를 \tabcontent 매크로의 값으로 사용합니다.

체크된 인수는 HTML 페이지가 로드될 때 기본적으로 탭을 선택합니다. 처음에 숨겨진 탭의 경우 빈 인수 {}를 전달합니다.

\tabcontent

\tabcontent {tab-id}

지정한 탭 ID로 탭에 콘텐츠를 추가합니다.

\endtabcontent

tabcontent로 시작하는 탭 콘텐츠의 끝을 표시합니다.

매크로도참조하십시오 .

© 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.