qt_disable_unicode_defines
Impedisce che alcune definizioni del compilatore relative all'Unicode vengano impostate automaticamente su un target.
Il comando è definito nel componente ` Core ` del pacchetto ` Qt6 `, che può essere caricato in questo modo:
find_package(Qt6 REQUIRED COMPONENTS Core)Questo comando è stato introdotto in Qt 6.2.
Sintassi
qt_disable_unicode_defines(target)Se i comandi senza versione sono disabilitati, utilizzare invece qt6_disable_unicode_defines(). Supporta lo stesso insieme di argomenti di questo comando.
Descrizione
In Qt 6, le definizioni del compilatore UNICODE e _UNICODE sono impostate per impostazione predefinita per i target che effettuano il collegamento con i moduli Qt. Ciò è in linea con il comportamento di qmake, ma rappresenta un cambiamento rispetto al comportamento dell’API CMake in Qt 5. La chiamata a qt_disable_unicode_defines() su un target impedisce che queste definizioni del compilatore vengano impostate automaticamente.
Vedi anche qt_allow_non_utf8_sources().
© 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.