Host QML 类型

Qt Remote Objects 网络主机节点。 更多...

import 语句: import QtRemoteObjects 6.7
实例化: QRemoteObjectHost

特性

方法

详细描述

The Host type provides an entry point to a Qt Remote Objects network. A network can be as simple as two nodes, or an arbitrarily complex set of processes and devices.

Hosts have the same capabilities as Nodes, but they can also be connected to and can share source objects on the network.

特性文档编制

hostUrl : url

用于节点的主机地址。

这是此节点将驻留的远程源对象的地址。

方法文档编制

bool disableRemoting ( 对象 remoteObject )

禁用远程访问 QObject remoteObject 。返回 false 若当前节点是客户端节点,或者若 remoteObject 未注册,和返回 true 若 Source (源) 对象成功禁用远程。

警告: 此对象的复本将不再有效,在调用此方法后。

另请参阅 enableRemoting ().

bool enableRemoting ( 对象 object , string name )

使主机节点能够动态提供远程访问 QObject object 。连接到托管此对象的节点的客户端节点,可以获得此源的复本。

可选 name defines the lookup-name under which the QObject can be acquired using QRemoteObjectNode::acquire () . If not explicitly set then the name given in the QCLASSINFO_REMOTEOBJECT_TYPE will be used. If no such macro was defined for the QObject 那么 QObject::objectName () is used.

返回 false 若当前节点是客户端节点,或者若 QObject 已注册为远程,和 true 若成功启用远程为动态 QObject .

另请参阅 disableRemoting ().