\youtube

Al generar documentación en línea, incrusta un vídeo de YouTube en el código HTML. Al generar documentación sin conexión (.qch), añade un enlace externo al vídeo con una imagen en miniatura. Los documentos HTML muestran una miniatura del vídeo con un botón de reproducción. Debes guardar la miniatura en la carpeta « \images\extraimages\ » de tu proyecto.

Utiliza la siguiente URL para abrir la imagen en miniatura en un navegador: https://img.youtube.com/vi/<ID>/0.jpg. La parte <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. Guarda el archivo de imagen como dQw4w9WgXcQ.jpg.

Debes añadir el nombre del archivo de la 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 el texto, escribe:

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