• PySide 模块
  • PySide.QtCore
  • 内容表

    上一话题

    QBasicTimer

    下一话题

    QModelIndex

    QPersistentModelIndex

    概要

    函数

    详细描述

    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.

    class PySide.QtCore. QPersistentModelIndex
    class PySide.QtCore. QPersistentModelIndex ( index )
    class PySide.QtCore. QPersistentModelIndex ( other )
    参数:

    创建新 PySide.QtCore.QPersistentModelIndex that is a copy of the model index .

    创建新 PySide.QtCore.QPersistentModelIndex that is a copy of the other persistent model index.

    PySide.QtCore.QPersistentModelIndex. child ( row , column )
    参数:
    • row PySide.QtCore.int
    • column PySide.QtCore.int
    返回类型:

    PySide.QtCore.QModelIndex

    Returns the child of the model index that is stored in the given row and column .

    PySide.QtCore.QPersistentModelIndex. column ( )
    返回类型: PySide.QtCore.int

    Returns the column this persistent model index refers to.

    PySide.QtCore.QPersistentModelIndex. data ( [ role=Qt.DisplayRole ] )
    参数: role PySide.QtCore.int
    返回类型: object

    返回数据为给定 role for the item referred to by the index.

    另请参阅

    Qt.ItemDataRole QAbstractItemModel.setData()

    PySide.QtCore.QPersistentModelIndex. flags ( )
    返回类型: PySide.QtCore.Qt.ItemFlags

    Returns the flags for the item referred to by the index.

    PySide.QtCore.QPersistentModelIndex. internalId ( )
    返回类型: PySide.QtCore.qint64

    返回 qint64 used by the model to associate the index with the internal data structure.

    PySide.QtCore.QPersistentModelIndex. internalPointer ( )
    返回类型: void

    返回 void * pointer used by the model to associate the index with the internal data structure.

    PySide.QtCore.QPersistentModelIndex. isValid ( )
    返回类型: 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.QPersistentModelIndex. model ( )
    返回类型: PySide.QtCore.QAbstractItemModel

    Returns the model that the index belongs to.

    PySide.QtCore.QPersistentModelIndex. __ne__ ( other )
    参数: 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.

    PySide.QtCore.QPersistentModelIndex. __ne__ ( other )
    参数: 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.

    PySide.QtCore.QPersistentModelIndex. __lt__ ( other )
    参数: 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.

    PySide.QtCore.QPersistentModelIndex. __eq__ ( other )
    参数: 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.

    PySide.QtCore.QPersistentModelIndex. __eq__ ( other )
    参数: 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.QPersistentModelIndex. parent ( )
    返回类型: 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.QPersistentModelIndex. row ( )
    返回类型: PySide.QtCore.int

    Returns the row this persistent model index refers to.

    PySide.QtCore.QPersistentModelIndex. sibling ( row , column )
    参数:
    • row PySide.QtCore.int
    • column PySide.QtCore.int
    返回类型:

    PySide.QtCore.QModelIndex

    Returns the sibling at row and column or an invalid PySide.QtCore.QModelIndex if there is no sibling at this position.