QAbstractItemModelReplica#

The QAbstractItemModelReplica class serves as a convenience class for Replicas of Sources based on QAbstractItemModel. More

Inheritance diagram of PySide6.QtRemoteObjects.QAbstractItemModelReplica

Synopsis#

Functions#

Signals#

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

Detailed Description#

QAbstractItemModelReplica makes replicating QAbstractItemModels more efficient by employing caching and pre-fetching.

See also

QAbstractItemModel

class PySide6.QtRemoteObjects.QAbstractItemModelReplica#
PySide6.QtRemoteObjects.QAbstractItemModelReplica.availableRoles()#
Return type:

.list of int

Returns a list of available roles.

See also

QAbstractItemModel

PySide6.QtRemoteObjects.QAbstractItemModelReplica.hasData(index, role)#
Parameters:
Return type:

bool

Returns true if there exists role data for the item at index. Returns false in any other case.

PySide6.QtRemoteObjects.QAbstractItemModelReplica.initialized()#

The initialized signal is emitted the first time we receive data from the Source .

See also

isInitialized()

PySide6.QtRemoteObjects.QAbstractItemModelReplica.isInitialized()#
Return type:

bool

Returns true if this replica has been initialized with data from the Source object. Returns false otherwise.

See also

initialized()

PySide6.QtRemoteObjects.QAbstractItemModelReplica.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_SIZE environment variable, or a default of 1000 if it is invalid or doesn’t exist.

PySide6.QtRemoteObjects.QAbstractItemModelReplica.selectionModel()#
Return type:

PySide6.QtCore.QItemSelectionModel

Returns a pointer to the QItemSelectionModel for the current QAbstractItemModelReplica .

PySide6.QtRemoteObjects.QAbstractItemModelReplica.setRootCacheSize(rootCacheSize)#
Parameters:

rootCacheSize – int

Sets the size of the internal cache to rootCacheSize.

See also

rootCacheSize()