QT_QML_NO_QML_PREVIEW (target property)

Opts a target out of automatic qmlpreview target creation.

This property was introduced in Qt 6.12.

Set this property to a true value on a target to prevent it from automatically getting a qmlpreview target created for it. By default, such a target is created for every executable that links against Qt6::Qml.

This property only has an effect on the automatic behavior, which can also be disabled globally via QT_QML_NO_QML_PREVIEW. It has no effect on an explicit call to qt_add_qml_preview() for the same target.

See also QT_QML_NO_QML_PREVIEW (global property) and 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.