QT_NO_UTF8_SOURCE

소스 파일을 Windows용 UTF-8로 강제로 처리하지 않도록 합니다.

이 프로퍼티는 Qt 6.0에 도입되었습니다.

일부 Windows용 컴파일러로 빌드할 때, Qt 라이브러리에 링크하는 타깃은 컴파일러가 소스 파일을 UTF-8로 처리하도록 강제하는 플래그를 사용합니다. 이 기능은 현재 Visual Studio 및 Intel 컴파일러에 구현되어 있습니다. 속성을 TRUE 으로 설정하여 대상별로 이 동작을 비활성화할 수 있습니다:

set_property(TARGET target_name PROPERTY QT_NO_UTF8_SOURCE TRUE)

참고: 이렇게 해도 QString 같은 클래스의 런타임 동작은 변경되지 않습니다( const char * 의 생성자에는 제대로 인코딩된 UTF-8 입력이 필요함). QT_NO_CAST_FROM_ASCIIQT_RESTRICTED_CAST_FROM_ASCII 매크로를 사용하면 이러한 코드를 식별하는 데 도움이 됩니다.

qt_disable_unicode_defines()qt6_allow_non_utf8_sources()도 참조하십시오 .

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