QT_NO_UTF8_SOURCE

Prevents forcing source files to be treated as UTF-8 for Windows.

This property was introduced in Qt 6.0.

When building with some compilers for Windows, targets that link to a Qt library will use flags that force the compiler to treat its source files as UTF-8. This is currently implemented for Visual Studio and Intel compilers. You can disable this behavior on a per-target basis by setting the property to TRUE:

set_property(TARGET target_name PROPERTY QT_NO_UTF8_SOURCE TRUE)

See also qt_disable_unicode_defines() and qt6_allow_non_utf8_sources().

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