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