\youtube

When generating online documentation, embeds a YouTube video in the HTML. When generating offline documentation (.qch), adds an external link to the video with a thumbnail image. The HTML docs show a thumbnail of the video with a play button. You need to save the thumbnail in \images\extraimages\ in your project folder.

Use the following URL to open the thumbnail image in a browser: https://img.youtube.com/vi/<ID>/0.jpg. The <ID> is the ID of the video on YouTube. For example, if the URL to the video is https://www.youtube.com/watch?v=dQw4w9WgXcQ&feature=youtu.be, the ID is dQw4w9WgXcQ. Save the image file as dQw4w9WgXcQ.jpg.

You must add the filename of the thumbnail file to \images\extraimages\extraimages.qdocconf. For example:

{HTML.extraimages,qhp.qtdesignstudio.extraFiles} += \
    images/dQw4w9WgXcQ.jpg

To add a link to the video in text, write:

\youtube dQw4w9WgXcQ

See also Macros.

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