QT_EXCLUDE_SOURCES_FROM_TRANSLATION
Questa proprietà è stata introdotta in Qt 6.7.
Questa proprietà di destinazione specifica un elenco di percorsi di file sorgente da escludere dalla traduzione. I file sorgente che corrispondono ai modelli presenti in questo elenco di esclusione vengono ignorati da lupdate.
I percorsi possono essere assoluti o relativi a CMAKE_CURRENT_SOURCE_DIR. I percorsi possono contenere caratteri jolly in un formato accettato da QRegularExpression::wildcardToRegularExpression.
Esempi
Escludere untranslatable.cpp e, in modo ricorsivo, tutti i file presenti nella directory 3rdparty.
qt_add_executable(myapp
main.cpp
untranslatable.cpp
3rdparty/sqlite/sqlite3.h
3rdparty/sqlite/sqlite3.c
3rdparty/zlib/src/gzlib.c
3rdparty/zlib/src/zlib.h
)
set_property(TARGET myapp PROPERTY QT_EXCLUDE_SOURCES_FROM_TRANSLATION
untranslatable.cpp
3rdparty/*
)Vedi anche qt_add_lupdate(), la proprietà del target QT_EXCLUDE_FROM_TRANSLATION e la proprietà della directory QT_EXCLUDE_FROM_TRANSLATION.
© 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.