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.
| 参数: |
|
|---|
创建新 PySide.QtCore.QPersistentModelIndex that is a copy of the model index .
创建新 PySide.QtCore.QPersistentModelIndex that is a copy of the other persistent model index.
| 参数: |
|
|---|---|
| 返回类型: |
Returns the child of the model index that is stored in the given row and column .
| 返回类型: | PySide.QtCore.int |
|---|
Returns the column this persistent model index refers to.
| 参数: | role – PySide.QtCore.int |
|---|---|
| 返回类型: | object |
返回数据为给定 role for the item referred to by the index.
另请参阅
Qt.ItemDataRole QAbstractItemModel.setData()
| 返回类型: | PySide.QtCore.Qt.ItemFlags |
|---|
Returns the flags for the item referred to by the index.
| 返回类型: | PySide.QtCore.qint64 |
|---|
返回 qint64 used by the model to associate the index with the internal data structure.
| 返回类型: | void |
|---|
返回 void * pointer used by the model to associate the index with the internal data structure.
| 返回类型: | 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.
| 返回类型: | PySide.QtCore.QAbstractItemModel |
|---|
Returns the model that the index belongs to.
| 参数: | other – PySide.QtCore.QModelIndex |
|---|---|
| 返回类型: | 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.
| 参数: | other – PySide.QtCore.QPersistentModelIndex |
|---|---|
| 返回类型: | PySide.QtCore.bool |
Returns true if this persistent model index is not equal to the other persistent model index; otherwise returns false.
| 参数: | other – PySide.QtCore.QPersistentModelIndex |
|---|---|
| 返回类型: | 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.
| 参数: | other – PySide.QtCore.QPersistentModelIndex |
|---|---|
| 返回类型: | 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.
| 参数: | other – PySide.QtCore.QModelIndex |
|---|---|
| 返回类型: | 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.
| 返回类型: | PySide.QtCore.QModelIndex |
|---|
Returns the parent PySide.QtCore.QModelIndex for this persistent index, or an invalid PySide.QtCore.QModelIndex if it has no parent.
| 返回类型: | PySide.QtCore.int |
|---|
Returns the row this persistent model index refers to.
| 参数: |
|
|---|---|
| 返回类型: |
Returns the sibling at row and column or an invalid PySide.QtCore.QModelIndex if there is no sibling at this position.