QT_QML_SINGLETON_TYPE

Marque un fichier QML comme fournissant un type singleton.

Cette propriété a été introduite dans Qt 6.2.

Un fichier .qml qui fournit un type singleton doit avoir sa propriété QT_QML_SINGLETON_TYPE source définie à TRUE pour s'assurer que la commande singleton est écrite dans le fichier qmldir. Cette opération doit être effectuée en plus du fichier QML contenant la déclaration pragma Singleton. La propriété source doit être définie avant de créer le module auquel le singleton appartient.

Voir qt_target_qml_sources() pour un exemple sur la façon de définir la propriété QT_QML_SINGLETON_TYPE.

Voir aussi 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.