QT_QML_SINGLETON_TYPE
QML ファイルがシングルトン型を提供していることを示します。
このプロパティはQt 6.2で導入されました。
シングルトン型を提供する.qml ファイルでは、シングルトンコマンドがqmldirファイルに書き込まれるように、QT_QML_SINGLETON_TYPE のsourceプロパティをTRUE に設定する必要があります。これは、pragma Singleton ステートメントを含むQMLファイルに加えて行う必要があります。sourceプロパティは、シングルトンが属するモジュールを作成する前に設定する必要があります。
QT_QML_SINGLETON_TYPE プロパティの設定例については、qt_target_qml_sources()を参照してください。
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.