이미지 삽입
그래픽 명령어를 사용하면 문서에 이미지를 삽입할 수 있습니다. 이미지는 별도의 단락으로 표시되거나 본문 내에 삽입될 수 있습니다.
\image
\image 명령어는 첫 번째 인자로 지정된 이미지를 삽입하고, 이를 별도의 단락으로 중앙 정렬하여 표시합니다.
이 명령어는 두 개의 인수를 받습니다. 첫 번째 인수는 이미지 파일의 이름입니다. 두 번째 인수는 이미지에 포함된 내용에 대한 설명으로, HTML의 ` alt ` 속성에 사용됩니다. 이 내용은 스크린 리더를 통해 음성으로 읽히므로, 접근성 향상을 위해 이 속성을 사용하는 것이 강력히 권장됩니다. 또한 Lynx 텍스트 브라우저와 같이 이미지를 지원하지 않는 브라우저에서도 사용될 수 있습니다. usealttextastitle 변수를 설정하여 QDoc이 이미지에 대한 title 속성을 생성하도록 할 수도 있는데, 이 속성은 일반적으로 그래픽 텍스트 브라우저에서 사용자가 마우스를 이미지 위로 올렸을 때 툴팁으로 표시됩니다.
QDoc은 오류에 대해 상당히 관대하지만, 파일 이름과 설명을 다음과 같이 중괄호로 감싸야 합니다:
\image {Bandit.png} {A Golden Retriever holding a bag of coffee in its mouth}이 구문은 가장 명확하며 항상 기대하는 결과를 제공해야 합니다. 그렇지 않은 경우, 파일 이름이나 설명 뒤에 반드시 줄 바꿈을 추가하십시오. 설명 인수가 여러 줄에 걸쳐 있는 경우 중괄호를 반드시 사용해야 합니다. 설명이 큰따옴표로 묶여 있는 경우, QDoc은 출력을 생성하기 전에 큰따옴표를 제거합니다. 특수 문자는 QDoc의 HTML 출력에서 해당 HTML 엔티티 코드로 대체될 수 있습니다.
/*!
Qt is a C++ toolkit for cross-platform GUI application development.
\image {happyguy.jpg} {Happy guy}
Qt provides single-source portability across Microsoft
Windows, macOS, Linux, and all major commercial Unix
variants. It is also available for embedded devices.
*/참조 \inlineimage 및 \caption.
\inlineimage
\inlineimage 명령어는 인자로 지정된 이미지를 표시합니다. 이 이미지는 나머지 텍스트와 함께 인라인으로 렌더링됩니다.
이 명령어는 두 개의 인수를 받습니다. 첫 번째 인수는 이미지 파일의 이름입니다. 두 번째 인수는 선택 사항이며, 중괄호 {} 안에 이미지를 간략하게 설명한 것으로, 이미지 태그의 HTML alt=""와 동일합니다. 이 설명은 툴팁에 사용되며, Lynx 텍스트 브라우저와 같이 이미지를 지원하지 않는 브라우저에서 사용됩니다.
\inlineimage 명령어의 가장 일반적인 용도는 목록과 표입니다. 다음은 목록에 인라인 이미지를 포함하는 예시입니다:
/*!
\list 1
\li \inlineimage happy.gif {Oh so happy, I am a caption!}
\li \inlineimage happy.gif Oh so happy, but I'm not a caption.
\endlist
*/다음은 표에 인라인 이미지를 삽입하는 예시입니다:
/*!
\table
\header
\li Qt
\li Qt Creator
\row
\li \inlineimage happy.gif {Oh so happy!}
\li \inlineimage happy.gif Oh so happy!
\row
\li \inlineimage happy.gif Oh so happy!
\li \inlineimage happy.gif {Oh so happy!}
\endtable
*/이 명령을 사용하면 텍스트와 나란히 이미지를 삽입할 수도 있습니다.
/*!
\inlineimage training.jpg {Qt Training} The Qt Programming course is
offered as a five day Open Enrollment Course. The classes are open to
the public. Although the course is open to anyone who wants to learn,
attendees should have significant experience in C++ development to
derive maximum benefit from the course.
*/\caption
\caption 명령어는 이미지에 캡션을 추가합니다.
이 명령어는 단락의 끝 부분까지 있는 모든 텍스트를 캡션으로 사용합니다. 원하는 효과를 얻을 때까지 여러 번 시도해 보세요.
/*!
\table 100%
\row
\li \image windows-pushbutton.png
\caption The QPushButton widget provides a command button.
\li \image windows-toolbutton.png
\caption The QToolButton class provides a quick-access button to commands
or options, usually used inside a QToolBar.
\endtable
*/참조 \image 및 \inlineimage
© 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.