QT_EXCLUDE_SOURCES_FROM_TRANSLATION
Essa propriedade foi introduzida no Qt 6.7.
Essa propriedade de destino especifica uma lista de caminhos de arquivos-fonte que são excluídos da tradução. Os arquivos-fonte que correspondem aos padrões nessa lista de exclusão são ignorados pelo ` lupdate`.
Os caminhos podem ser absolutos ou relativos a CMAKE_CURRENT_SOURCE_DIR. Os caminhos podem conter caracteres curinga em um formato aceito por QRegularExpression::wildcardToRegularExpression.
Exemplos
Excluir untranslatable.cpp e, recursivamente, todos os arquivos no diretório 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/*
)Veja também qt_add_lupdate(), a propriedade de destino QT_EXCLUDE_FROM_TRANSLATION e a propriedade de diretório 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.