本页内容

Node QML Type

Qt Remote Objects 网络上的一个节点。更多内容...

Import Statement: import QtRemoteObjects 6.12
In C++: QRemoteObjectNode

属性

详细说明

“节点”类型为Qt Remote Objects 网络提供了一个入口点。一个网络可以简单到仅由两个节点组成,也可以是任意复杂的进程和设备集合。

节点没有其他节点可以连接的 URL,因此只能获取副本,无法共享源对象。

属性文档

heartbeatInterval : int

心跳间隔(单位:毫秒)。

心跳(仅对套接字连接有用)会定期向已连接的节点发送消息,以检测连接是否中断。如果检测到连接中断,Qt Remote Objects 将尝试自动重新连接。此功能有助于进行该检测,因为客户端只有在尝试发送数据时才会检测到服务器不可用。

将该值设为0 (默认值)将禁用心跳功能。

persistedStore : QRemoteObjectAbstractPersistedStore

允许为该节点设置一个QRemoteObjectAbstractPersistedStore 实例。

允许具有 PERSISTED 特性的副本PROP成员在副本被删除时保存其当前值,并在下次启动副本时恢复已存储的值。

需要实现一个QRemoteObjectAbstractPersistedStore 类来控制持久化的处理位置和方式。SettingsStore 提供了一个基于QSettings 的默认实现。

registryUrl : url

该节点所使用的Registry 的地址。

如果未使用任何注册表,则此处为空的QUrl 。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.