PythonQt.QtCore.QModelIndex · declarations 001
Back to PythonQt.QtCore.QModelIndex
child
child(row: int, column: int) -> Any
X.child(row, column) -> PythonQt.QtCore.QModelIndex
Upstream PySide2 reference signatures (binding differences may apply):
child(self, row: int, column: int) -> PySide2.QtCore.QModelIndex
Source: https://doc.qt.io/archives/qt-5.15/qmodelindex.html#child
column
column() -> int
X.column() -> int
Supplemental documentation: Qt 5 reference:
int QModelIndex::column() const
Returns the column this model index refers to.
Upstream PySide2 reference signatures (binding differences may apply):
column(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmodelindex.html#column
data
data(role: int) -> Any
X.data(role) -> object
Supplemental documentation: Qt 5 reference:
QVariant QModelIndex::data(int role \= Qt::DisplayRole) const
Returns the data for the given role for the item referred to by the index, or a default-constructed QVariant if this model index is invalid.
Upstream PySide2 reference signatures (binding differences may apply):
data(self, role: int=...) -> typing.Any
Source: https://doc.qt.io/archives/qt-5.15/qmodelindex.html#data
flags
flags() -> Any
X.flags()
Supplemental documentation: Qt 5 reference:
Qt::ItemFlags QModelIndex::flags() const
Returns the flags for the item referred to by the index.
This function was introduced in Qt 4.2.
Upstream PySide2 reference signatures (binding differences may apply):
flags(self) -> PySide2.QtCore.Qt.ItemFlags
Source: https://doc.qt.io/archives/qt-5.15/qmodelindex.html#flags
internalId
internalId() -> int
X.internalId() -> int
Supplemental documentation: Qt 5 reference:
quintptr QModelIndex::internalId() const
Returns a quintptr used by the model to associate the index with the internal data
structure.
See also QAbstractItemModel::createIndex().
Upstream PySide2 reference signatures (binding differences may apply):
internalId(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmodelindex.html#internalId
internalPointer
internalPointer() -> int
X.internalPointer()
Supplemental documentation: Qt 5 reference:
void *QModelIndex::internalPointer() const
Returns a void * pointer used by the model to associate the index with the internal
data structure.
See also QAbstractItemModel::createIndex().
Upstream PySide2 reference signatures (binding differences may apply):
internalPointer(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmodelindex.html#internalPointer
isValid
isValid() -> bool
X.isValid() -> bool
Supplemental documentation: Qt 5 reference:
bool QModelIndex::isValid() const
Returns true if this model index is valid; otherwise returns false.
A valid index belongs to a model, and has non-negative row and column numbers.
See also model(), row(), and column().
Upstream PySide2 reference signatures (binding differences may apply):
isValid(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qmodelindex.html#isValid
model
model() -> Any
X.model() -> PythonQt.QtCore.QAbstractItemModel
Supplemental documentation: Qt 5 reference:
const QAbstractItemModel *QModelIndex::model() const
Returns a pointer to the model containing the item that this index refers to.
A const pointer to the model is returned because calls to non-const functions of the model might invalidate the model index and possibly crash your application.
Upstream PySide2 reference signatures (binding differences may apply):
model(self) -> PySide2.QtCore.QAbstractItemModel
Source: https://doc.qt.io/archives/qt-5.15/qmodelindex.html#model
parent
parent() -> Any
X.parent() -> PythonQt.QtCore.QModelIndex
Supplemental documentation: Qt 5 reference:
QModelIndex QModelIndex::parent() const
Returns the parent of the model index, or QModelIndex() if it has no parent.
See also sibling() and model().
Upstream PySide2 reference signatures (binding differences may apply):
parent(self) -> PySide2.QtCore.QModelIndex
Source: https://doc.qt.io/archives/qt-5.15/qmodelindex.html#parent
row
row() -> int
X.row() -> int
Supplemental documentation: Qt 5 reference:
int QModelIndex::row() const
Returns the row this model index refers to.
Upstream PySide2 reference signatures (binding differences may apply):
row(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmodelindex.html#row
sibling
sibling(row: int, column: int) -> Any
X.sibling(row, column) -> PythonQt.QtCore.QModelIndex
Supplemental documentation: Qt 5 reference:
QModelIndex QModelIndex::sibling(int row, int column) const
Returns the sibling at row and column. If there is no sibling at this position, an invalid QModelIndex is returned.
See also parent(), siblingAtColumn(), and siblingAtRow().
Upstream PySide2 reference signatures (binding differences may apply):
sibling(self, row: int, column: int) -> PySide2.QtCore.QModelIndex
Source: https://doc.qt.io/archives/qt-5.15/qmodelindex.html#sibling