QRemoteObjectDynamicReplica Class

A dynamically instantiated Replica. More...

Header: #include <QRemoteObjectDynamicReplica>
Inherits: QRemoteObjectReplica

Public Functions

virtual ~QRemoteObjectDynamicReplica() override

Reimplemented Public Functions

virtual const QMetaObject *metaObject() const override
virtual int qt_metacall(QMetaObject::Call call, int id, void **argv) override
virtual void *qt_metacast(const char *name) override

Detailed Description

\inmoduleQtRemoteObjects

There are generated replicas (replicas having the header files produced by the Replica Compiler), and dynamic replicas, that are generated on-the-fly. This is the class for the dynamic type of replica.

When the connection to the Source object is made, the initialization step passes the current property values (see Replica Initialization). In a DynamicReplica, the property/signal/slot details are also sent, allowing the replica object to be created on-the-fly. This can be convenient in QML or scripting, but has two primary disadvantages. First, the object is in effect "empty" until it is successfully initialized by the Source. Second, in C++, calls must be made using QMetaObject::invokeMethod(), as the moc generated lookup will not be available.

This class does not have a public constructor. It can only be instantiated by using the dynamic QRemoteObjectNode::acquire method.

Member Function Documentation

[override virtual noexcept] QRemoteObjectDynamicReplica::~QRemoteObjectDynamicReplica()

Destroys the dynamic replica.

See also Replica Ownership.

[override virtual] const QMetaObject *QRemoteObjectDynamicReplica::metaObject() const

Reimplements: QObject::metaObject() const.

\internalReturns a pointer to the dynamically generated meta-object of this object, or QRemoteObjectDynamicReplica's metaObject if the object is not initialized. This function overrides the QObject::metaObject() virtual function to provide the same functionality for dynamic replicas.

See also QObject::metaObject() and Replica Initialization.

[override virtual] int QRemoteObjectDynamicReplica::qt_metacall(QMetaObject::Call call, int id, void **argv)

\internalThis function overrides the QObject::qt_metacall() virtual function to provide the same functionality for dynamic replicas.

See also QObject::qt_metacall().

[override virtual] void *QRemoteObjectDynamicReplica::qt_metacast(const char *name)

\internalThis function overrides the QObject::qt_metacast() virtual function to provide the same functionality for dynamic replicas.

See also QObject::qt_metacast().