\youtube

Durante la generazione della documentazione online, incorpora un video di YouTube nel codice HTML. Durante la generazione della documentazione offline (.qch), aggiunge un link esterno al video con un'immagine in miniatura. I documenti HTML mostrano un'anteprima del video con un pulsante di riproduzione. È necessario salvare l'anteprima nel file \images\extraimages\ nella cartella del progetto.

Utilizzare il seguente URL per aprire l'immagine in miniatura in un browser: https://img.youtube.com/vi/<ID>/0.jpg. L'<ID> è l'ID del video su YouTube. Ad esempio, se l'URL del video è https://www.youtube.com/watch?v=dQw4w9WgXcQ&feature=youtu.be, l'ID è dQw4w9WgXcQ. Salvare il file immagine come dQw4w9WgXcQ.jpg.

È necessario aggiungere il nome del file della miniatura a \images\extraimages\extraimages.qdocconf. Ad esempio:

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

Per aggiungere un link al video nel testo, scrivi:

\youtube dQw4w9WgXcQ

Vedi anche Macro.

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