Including Images

The graphic commands makes it possible to include images in the documentation. The images can be rendered as separate paragraphs, or within running text.

\image

The \image command expands to the image specified by its first argument, and renders it centered as a separate paragraph.

The command takes two arguments. The first argument is the name of the image file. The second argument is optional and is a simple description of the image, equivalent to the HTML alt="" in an image tag. The description is used for tooltips and for browsers that don't support images, like the Lynx text browser.

The remaining text after the file name is the optional, description argument. Be sure to follow the file name or the description with a line break. Curly brackets are required if the description argument spans multiple lines.

/*!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.*/

QDoc renders this as:

Qt is a C++ toolkit for cross-platform GUI application development.

Qt provides single-source portability across Microsoft Windows, macOS, Linux, and all major commercial Unix variants. It is also available for embedded devices.

\inlineimage

The \inlineimage command expands to the image specified by its argument. The image is rendered inline with the rest of the text.

The command takes two arguments. The first argument is the name of the image file. The second argument is optional and is a simple description of the image, equivalent to the HTML alt="" in an image tag. The description is used for tooltips, and for when a browser doesn't support images, like the Lynx text browser.

The most common use of the \inlineimage command is in lists and tables. Here is an example of including inline images in a list:

/*!
\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.*/

QDoc renders this as:

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.