QT_EXCLURE_LES_SOURCES_DE_LA_TRADUCTION
Cette propriété a été introduite dans Qt 6.7.
Cette propriété cible spécifie une liste de chemins d'accès aux fichiers sources qui sont exclus de la traduction. Les fichiers sources qui correspondent aux motifs de cette liste d'exclusion sont ignorés par lupdate.
Les chemins d'accès peuvent être absolus ou relatifs à CMAKE_CURRENT_SOURCE_DIR. Les chemins d'accès peuvent contenir des caractères génériques dans un format accepté par QRegularExpression::wildcardToRegularExpression.
Exemples
Exclure untranslatable.cpp et récursivement tous les fichiers du répertoire 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/*
)Voir aussi qt_add_lupdate, propriété de cible QT_EXCLUDE_FROM_TRANSLATION, et propriété de répertoire 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.