PySide6.QtRemoteObjects.QAbstractItemModelReplica¶
- class QAbstractItemModelReplica¶
QAbstractItemModelReplica类是基于 QAbstractItemModel 的源副本的便利类。更多…概要¶
方法¶
def
availableRoles()def
hasData()def
isInitialized()def
rootCacheSize()def
selectionModel()
信号¶
def
initialized()
注意
本文档可能包含从C++自动翻译到Python的代码片段。我们始终欢迎对代码片段翻译的贡献。如果您发现翻译问题,您也可以通过在我们的https:/bugreports.qt.io/projects/PYSIDE上创建工单来告知我们。
详细描述¶
QAbstractItemModelReplica通过使用缓存和预取技术,使复制 QAbstractItemModels 更加高效。另请参阅
- availableRoles()¶
- Return type:
整数列表
返回可用角色的列表。
另请参阅
- hasData(index, role)¶
- Parameters:
index –
QModelIndexrole – int
- Return type:
布尔
如果存在位于
index处的项目的role数据,则返回true。在其他任何情况下返回false。- initialized()¶
初始化信号在我们第一次从Source接收到数据时发出。
另请参阅
- isInitialized()¶
- Return type:
布尔
如果此副本已使用来自Source对象的数据进行初始化,则返回
true。否则返回false。另请参阅
- rootCacheSize()¶
- Return type:
整数
返回内部缓存的当前大小。默认情况下,这设置为
QTRO_NODES_CACHE_SIZE环境变量的值,如果无效或不存在,则默认为1000。另请参阅
- selectionModel()¶
- Return type:
返回指向当前
QAbstractItemModelReplica的QItemSelectionModel的指针。- setRootCacheSize(rootCacheSize)¶
- Parameters:
rootCacheSize – int
将内部缓存的大小设置为
rootCacheSize。另请参阅