QT_QML_SINGLETON_TYPE
Indica que um arquivo QML fornece um tipo singleton.
Essa propriedade foi introduzida no Qt 6.2.
Um arquivo ` .qml ` que forneça um tipo singleton precisa ter sua propriedade de fonte ` QT_QML_SINGLETON_TYPE ` definida como ` TRUE ` para garantir que o comando singleton seja gravado no arquivo `qmldir `. Isso deve ser feito além do arquivo QML conter a instrução ` pragma Singleton `. A propriedade de fonte deve ser definida antes de criar o módulo ao qual o singleton pertence.
Consulte qt_target_qml_sources() para ver um exemplo de como definir a propriedade QT_QML_SINGLETON_TYPE.
Consulte também 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.