QRemoteObjectDynamicReplica 类

动态实例化 复本 . 更多...

头: #include <QRemoteObjectDynamicReplica>
CMake: find_package(Qt6 COMPONENTS RemoteObjects REQUIRED)
target_link_libraries(mytarget PRIVATE Qt6::RemoteObjects)
qmake: QT += remoteobjects
继承: QRemoteObjectReplica

公共函数

virtual ~QRemoteObjectDynamicReplica () override

详细描述

There are generated replicas (replicas having the header files produced by the RepC (复本编译器) ), and dynamic replicas, that are generated on-the-fly. This is the class for the dynamic type of replica.

当连接到 object is made, the initialization step passes the current property values (see Replica 初始化 ). 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 . 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 方法。

成员函数文档编制

[override virtual] QRemoteObjectDynamicReplica:: ~QRemoteObjectDynamicReplica ()

销毁动态复本。

另请参阅 复本所有权 .