QT_QML_SINGLETON_TYPE
Indique qu'un fichier QML fournit un type singleton.
Cette propriété a été introduite dans Qt 6.2.
Un fichier ` .qml ` fournissant un type singleton doit voir sa propriété `source` de ` QT_QML_SINGLETON_TYPE ` définie sur ` TRUE ` afin de garantir que la commande singleton soit écrite dans le fichier `qmldir `. Cette opération doit être effectuée en plus de l'ajout de l'instruction ` pragma Singleton ` dans le fichier QML. La propriété `source` doit être définie avant la création du module auquel appartient le singleton.
Voir qt_target_qml_sources() pour un exemple illustrant comment définir la propriété « QT_QML_SINGLETON_TYPE ».
Voir également 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.