On this page

QAbstractObjectRegistryRef Class

The QAbstractObjectRegistryRef class is a base class for all Qt Qml Design Support object reference classes. More...

Header: #include <QAbstractObjectRegistryRef>
CMake: find_package(Qt6 REQUIRED COMPONENTS QmlDesignSupport)
target_link_libraries(mytarget PRIVATE Qt6::QmlDesignSupport)
qmake: QT += qmldesignsupport
Since: Qt 6.12
In QML: AbstractObjectRegistryRef
Inherits: QObject
Inherited By:

QMultiObjectRegistryRef and QObjectRegistryRef

Properties

  • key : QString

Public Functions

QString key() const
void setKey(const QString &key)

Signals

void keyChanged()

Detailed Description

This class can't be instantiated on its own, you must use one of the following derived classes: QObjectRegistryRef or QMultiObjectRegistryRef

If multiple objects are registered with the same key, use the derived class QMultiObjectRegistryRef. Typically this happens when delegate objects instantiated by models are registered. If you know the key is used to register only a single object, using the derived class QObjectRegistryRef is recommended.

Property Documentation

key : QString

This property holds the key of the registered object that this reference refers to.

Access functions:

QString key() const
void setKey(const QString &key)

Notifier signal:

void keyChanged()

See also ObjectRegistry.

© 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.