QML 的 CMake 策略
Qt Qml 提供了若干 CMake 策略,用于控制 QML 相关 CMake 命令的向后兼容性及其行为。
可用策略
设置策略
请在 CMakeLists.txt 中使用qt_policy() 或cmake_policy() 来设置这些策略:
qt_policy(SET QTP0001 NEW)另请参阅 QML 的 CMake 集成以及qt_add_qml_module。
© 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.