\youtube
オンラインドキュメントを生成する際、HTML内にYouTube動画を埋め込みます。オフラインドキュメント(.qch)を生成する際は、サムネイル画像付きの動画への外部リンクを追加します。HTMLドキュメントには、再生ボタン付きの動画のサムネイルが表示されます。サムネイル画像は、プロジェクトフォルダ内の\images\extraimages\ に保存する必要があります。
以下のURLを使用して、ブラウザでサムネイル画像を開きます:https://img.youtube.com/vi/<ID>/0.jpg 。「<ID> 」は、YouTube上の動画のIDです。たとえば、動画のURLがhttps://www.youtube.com/watch?v=dQw4w9WgXcQ&feature=youtu.be の場合、IDはdQw4w9WgXcQ となります。画像ファイルをdQw4w9WgXcQ.jpg として保存してください。
サムネイルファイルのファイル名を\images\extraimages\extraimages.qdocconf に追加する必要があります。例:
{HTML.extraimages,qhp.qtdesignstudio.extraFiles} += \
images/dQw4w9WgXcQ.jpgテキスト内に動画へのリンクを追加するには、次のように記述します:
\youtube dQw4w9WgXcQ「マクロ」も参照してください 。
© 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.