\youtube

Al generar documentación en línea, incrusta un vídeo de YouTube en el HTML. Al generar documentación sin conexión (.qch), añade un enlace externo al vídeo con una imagen en miniatura. La documentación HTML muestra una miniatura del vídeo con un botón de reproducción. Es necesario guardar la miniatura en \images\extraimages\ en la carpeta del proyecto.

Utilice la siguiente URL para abrir la imagen en miniatura en un navegador: https://img.youtube.com/vi/<ID>/0.jpg. <ID> es el ID del vídeo en YouTube. Por ejemplo, si la URL del vídeo es https://www.youtube.com/watch?v=dQw4w9WgXcQ&feature=youtu.be, el ID es dQw4w9WgXcQ. Guarde el archivo de imagen como dQw4w9WgXcQ.jpg.

Debe añadir el nombre del archivo en miniatura a \images\extraimages\extraimages.qdocconf. Por ejemplo:

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

Para añadir un enlace al vídeo en texto, escriba:

\youtube dQw4w9WgXcQ

Véase también Macros.

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