QT_QML_SINGLETON_TYPE

Marca un archivo QML como que proporciona un tipo singleton.

Esta propiedad se introdujo en Qt 6.2.

Un archivo .qml que proporcione un tipo singleton debe tener su propiedad source QT_QML_SINGLETON_TYPE establecida en TRUE para garantizar que el comando singleton se escriba en el archivo qmldir. Esto debe hacerse además del archivo QML que contiene la sentencia pragma Singleton. La propiedad source debe establecerse antes de crear el módulo al que pertenece el singleton.

Consulte qt_target_qml_sources() para ver un ejemplo de cómo establecer la propiedad QT_QML_SINGLETON_TYPE.

Véase también qt_target_qml_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.