The PySide.QtCore.QPersistentModelIndex class is used to locate data in a data model.
A PySide.QtCore.QPersistentModelIndex is a model index that can be stored by an application, and later used to access information in a model. Unlike the PySide.QtCore.QModelIndex class, it is safe to store a PySide.QtCore.QPersistentModelIndex since the model will ensure that references to items will continue to be valid as long as they can be accessed by the model.
It is good practice to check that persistent model indexes are valid before using them.
See also
Model/View Programming PySide.QtCore.QModelIndex PySide.QtCore.QAbstractItemModel
Parameters: |
|
---|
Creates a new PySide.QtCore.QPersistentModelIndex that is a copy of the model index .
Creates a new PySide.QtCore.QPersistentModelIndex that is a copy of the other persistent model index.
Parameters: |
|
---|---|
Return type: |
Returns the child of the model index that is stored in the given row and column .
Return type: | PySide.QtCore.int |
---|
Returns the column this persistent model index refers to.
Parameters: | role – PySide.QtCore.int |
---|---|
Return type: | object |
Returns the data for the given role for the item referred to by the index.
See also
Qt.ItemDataRole QAbstractItemModel.setData()
Return type: | PySide.QtCore.Qt.ItemFlags |
---|
Returns the flags for the item referred to by the index.
Return type: | PySide.QtCore.qint64 |
---|
Returns a qint64 used by the model to associate the index with the internal data structure.
Return type: | void |
---|
Returns a void* pointer used by the model to associate the index with the internal data structure.
Return type: | PySide.QtCore.bool |
---|
Returns true if this persistent model index is valid; otherwise returns false.
A valid index belongs to a model, and has non-negative row and column numbers.
Return type: | PySide.QtCore.QAbstractItemModel |
---|
Returns the model that the index belongs to.
Parameters: | other – PySide.QtCore.QModelIndex |
---|---|
Return type: | PySide.QtCore.bool |
Returns true if this persistent model index does not refer to the same location as the other model index; otherwise returns false.
Parameters: | other – PySide.QtCore.QPersistentModelIndex |
---|---|
Return type: | PySide.QtCore.bool |
Returns true if this persistent model index is not equal to the other persistent model index; otherwise returns false.
Parameters: | other – PySide.QtCore.QPersistentModelIndex |
---|---|
Return type: | PySide.QtCore.bool |
Returns true if this persistent model index is smaller than the other persistent model index; otherwise returns false.
All values in the persistent model index are used when comparing with another persistent model index.
Parameters: | other – PySide.QtCore.QPersistentModelIndex |
---|---|
Return type: | PySide.QtCore.bool |
Returns true if this persistent model index is equal to the other persistent model index; otherwise returns false.
All values in the persistent model index are used when comparing with another persistent model index.
Parameters: | other – PySide.QtCore.QModelIndex |
---|---|
Return type: | PySide.QtCore.bool |
Returns true if this persistent model index refers to the same location as the other model index; otherwise returns false.
All values in the persistent model index are used when comparing with another model index.
Return type: | PySide.QtCore.QModelIndex |
---|
Returns the parent PySide.QtCore.QModelIndex for this persistent index, or an invalid PySide.QtCore.QModelIndex if it has no parent.
Return type: | PySide.QtCore.int |
---|
Returns the row this persistent model index refers to.
Parameters: |
|
---|---|
Return type: |
Returns the sibling at row and column or an invalid PySide.QtCore.QModelIndex if there is no sibling at this position.