ObjectRegistryRef QML Type
この型は、ObjectRegistry 型として登録されたオブジェクトにアクセスするために使用されます。詳細...
| Import Statement: | import QtQml.DesignSupport |
| Since: | Qt 6.12 |
| In C++: | QObjectRegistryRef |
| Inherits: |
- 継承されたメンバーを含む、すべてのメンバーの一覧
- ObjectRegistryRefは、Qt Qml Design Support QML Typesの一部です。
プロパティ
- object : QtObject
詳細な説明
使用例:
// Register object in a QML file
MouseArea {
ObjectRegistry.key: "MyMouseArea"
}
// In another QML file, refer to the registered object
ObjectRegistryRef {
id: mouseAreaRef
key: "MyMouseArea"
Connections {
target: mouseAreaRef.object
function onClicked(mouse) {
console.log("Mouse clicked")
}
}
}関連項目: ObjectRegistry およびAbstractObjectRegistryRef::key 。
プロパティのドキュメント
object : QtObject [read-only]
このプロパティは、このインスタンスが参照するオブジェクトを指定します。
同じキーで複数のオブジェクトが登録されている場合、このインスタンスはそのグループ内の特定のオブジェクトを参照します。この場合は、QMultiObjectRegistryRef を使用してください。
「 ObjectRegistry 」および「AbstractObjectRegistryRef::key 」も参照してください 。
© 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.