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_ASCII とQT_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.