画像を含む
グラフィック・コマンドを使用すると、ドキュメントに画像を含めることができます。画像は独立した段落として、または実行中のテキスト内に表示することができます。
\画像
imageコマンドは、最初の引数で指定された画像に展開し、別の段落として中央に配置します。
このコマンドは2つの引数を取ります。最初の引数は画像ファイルの名前です。2番目の引数はオプションで、画像の簡単な説明で、画像タグのHTML alt=""に相当します。この説明は、ツールチップや、テキストブラウザLynxのように画像をサポートしないブラウザのために使用されます。
ファイル名の後の残りのテキストは、オプションの、説明の引数です。ファイル名または説明の後には必ず改行を入れてください。説明の引数が複数行にまたがる場合は、丸括弧が必要です。
/*! 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. */
を参照してください。
\を参照してください。
lineimageコマンドは、引数で指定された画像に展開されます。画像はテキストの残りの部分とインラインでレンダリングされます。
コマンドは2つの引数を取る。最初の引数は画像ファイルの名前です。2番目の引数はオプションで、中括弧{}内に画像の簡単な説明を記述します。この説明はツールチップや、Lynxテキストブラウザのようにブラウザが画像をサポートしていない場合に使用されます。
インライン画像コマンドの最も一般的な使い方は、リストと表です。以下は、リストにインライン画像を含める例です:
/*! \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. */
\キャプション
を参照してください。
このコマンドは段落の最後までの全てのテキストをキャプションにします。お望みの効果が得られるまで試してみてください。
/*! \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 */
を参照してください。
© 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.