Host QML 类型

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

导入语句: import QtRemoteObjects 5.15
实例化: 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

The host address for the node.

This is the address where source objects remoted by this node will reside.


方法文档编制

bool disableRemoting ( object remoteObject )

禁用远程访问 QObject remoteObject 。返回 false if the current node is a client node or if the remoteObject is not registered, and returns true if remoting is successfully disabled for the Source object.

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

另请参阅 enableRemoting() .


bool enableRemoting ( object 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() 的使用。

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

另请参阅 disableRemoting() .