Node QML Type

Qt Remote Objects 网络中的一个节点。更多

Import Statement: import QtRemoteObjects 6.9
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 为空。


© 2025 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.