QT_QML_NO_QML_PREVIEW(目标属性)

将目标从自动创建的 qmlpreview 目标中排除。

该属性在 Qt 6.12 中引入。

将此属性设置为 true 值,可防止为该目标自动创建qmlpreview目标。默认情况下,对于每个链接到Qt6::Qml 的可执行文件,都会为其创建此类目标。

该属性仅对自动行为产生影响,该行为也可通过 QT_QML_NO_QML_PREVIEW 全局禁用。对于同一目标的显式qt_add_qml_preview()调用,该属性不产生影响。

另请参阅 QT_QML_NO_QML_PREVIEW(全局属性)和qt_add_qml_preview()。

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