QT_DISCARD_FILE_CONTENTS

Specifica che i file indicati devono essere vuoti nel file system delle risorse.

Questa proprietà è stata introdotta in Qt 6.6.

Nota: questa proprietà è in fase di anteprima tecnologica e potrebbe subire modifiche nelle versioni future.

Quando si utilizza la variante basata sul target di `qt_add_resources()` o `qt_add_qml_module()`, impostando questa proprietà su ` TRUE ` il contenuto del file viene omesso durante la creazione del sistema di file delle risorse. Il nome del file viene mantenuto.

Ciò è utile se si desidera rimuovere il codice sorgente QML dal file binario.

Nota: se si omette il codice sorgente QML dal binario, il motore QML dovrà fare affidamento sulle unità di compilazione create da `qmlcachegen` o `qmlsc`. Queste sono legate alla versione specifica di Qt con cui sono state compilate. Se si modifica la versione di Qt utilizzata dall'applicazione, non potranno più essere caricate.

Vedi anche Il sistema di risorse di Qt.

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