PySide6.QtRemoteObjects.QAbstractItemModelReplica¶
- class QAbstractItemModelReplica¶
The
QAbstractItemModelReplicaclass serves as a convenience class for Replicas of Sources based on QAbstractItemModel.Details
QAbstractItemModelReplicamakes replicating QAbstractItemModels more efficient by employing caching and pre-fetching.See also
Synopsis¶
Methods¶
def
availableRoles()def
hasData()def
isInitialized()def
rootCacheSize()def
selectionModel()
Signals¶
def
initialized()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
- availableRoles()¶
- Return type:
.list of int
Returns a list of available roles.
See also
- hasData(index, role)¶
- Parameters:
index –
QModelIndexrole – int
- Return type:
bool
Returns
trueif there existsroledata for the item atindex. Returnsfalsein any other case.- initialized()¶
The initialized signal is emitted the first time we receive data from the Source .
See also
- isInitialized()¶
- Return type:
bool
Returns
trueif this replica has been initialized with data from the Source object. Returnsfalseotherwise.See also
- rootCacheSize()¶
- Return type:
int
Returns the current size of the internal cache. By default this is set to the value of the
QTRO_NODES_CACHE_SIZEenvironment variable, or a default of1000if it is invalid or doesn’t exist.See also
- selectionModel()¶
- Return type:
Returns a pointer to the QItemSelectionModel for the current
QAbstractItemModelReplica.- setRootCacheSize(rootCacheSize)¶
- Parameters:
rootCacheSize – int
Sets the size of the internal cache to
rootCacheSize.See also