PythonQt.QtCore.QAbstractItemModel · declarations 003
Back to PythonQt.QtCore.QAbstractItemModel
rowsMoved
rowsMoved(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtCore.QAbstractItemModel.rowsMoved; argument details are not documented.
Supplemental documentation: Qt 5 reference:
[signal] void QAbstractItemModel::rowsMoved(const QModelIndex \&parent, int start, int end, const QModelIndex \&destination, int row)
This signal is emitted after rows have been moved within the model. The items between start and end inclusive, under the given parent item have been moved to destination starting at the row row.
Note: Components connected to this signal use it to adapt to changes in the model's dimensions. It can only be emitted by the QAbstractItemModel implementation, and cannot be explicitly emitted in subclass code.
Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.
This function was introduced in Qt 4.6.
See also beginMoveRows().
Source: https://doc.qt.io/archives/qt-5.15/qabstractitemmodel.html#rowsMoved
rowsRemoved
rowsRemoved(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtCore.QAbstractItemModel.rowsRemoved; argument details are not documented.
Supplemental documentation: Qt 5 reference:
[signal] void QAbstractItemModel::rowsRemoved(const QModelIndex \&parent, int first, int last)
This signal is emitted after rows have been removed from the model. The removed items are those between first and last inclusive, under the given parent item.
Note: Components connected to this signal use it to adapt to changes in the model's dimensions. It can only be emitted by the QAbstractItemModel implementation, and cannot be explicitly emitted in subclass code.
Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.
See also removeRows() and beginRemoveRows().
Source: https://doc.qt.io/archives/qt-5.15/qabstractitemmodel.html#rowsRemoved
setData
setData(index: Any, value: Any, role: int) -> bool
X.setData(index, value, role) -> bool
Supplemental documentation: Qt 5 reference:
[virtual] bool QAbstractItemModel::setData(const QModelIndex \&index, const QVariant \&value, int role \= Qt::EditRole)
Sets the role data for the item at index to value.
Returns true if successful; otherwise returns false.
The dataChanged() signal should be emitted if the data was successfully set.
The base class implementation returns false. This function and
data() must be
reimplemented for editable models.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
See also Qt::ItemDataRole, data(), and itemData().
Upstream PySide2 reference signatures (binding differences may apply):
setData(self, index: PySide2.QtCore.QModelIndex, value: typing.Any, role: int=...) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qabstractitemmodel.html#setData
setHeaderData
setHeaderData(section: int, orientation: Any, value: Any, role: int) -> bool
X.setHeaderData(section, orientation, value, role) -> bool
Supplemental documentation: Qt 5 reference:
[virtual] bool QAbstractItemModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant \&value, int role \= Qt::EditRole)
Sets the data for the given role and section in the header with the specified orientation to the value supplied.
Returns true if the header's data was updated; otherwise returns false.
When reimplementing this function, the headerDataChanged() signal must be emitted explicitly.
See also Qt::ItemDataRole and headerData().
Upstream PySide2 reference signatures (binding differences may apply):
setHeaderData(self, section: int, orientation: PySide2.QtCore.Qt.Orientation, value: typing.Any, role: int=...) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qabstractitemmodel.html#setHeaderData
setItemData
setItemData(index: Any, roles: Any) -> bool
X.setItemData(index, roles) -> bool
Supplemental documentation: Qt 5 reference:
[virtual] bool QAbstractItemModel::setItemData(const QModelIndex \&index, const QMap\<int, QVariant> \&roles)
Sets the role data for the item at index to the associated value in roles, for every Qt::ItemDataRole.
Returns true if successful; otherwise returns false.
Roles that are not in roles will not be modified.
See also setData(), data(), and itemData().
Upstream PySide2 reference signatures (binding differences may apply):
setItemData(self, index: PySide2.QtCore.QModelIndex, roles: typing.Dict[int, typing.Any]) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qabstractitemmodel.html#setItemData
sibling
sibling(row: int, column: int, idx: Any) -> Any
X.sibling(row, column, idx) -> PythonQt.QtCore.QModelIndex
Supplemental documentation: Qt 5 reference:
[virtual] QModelIndex QAbstractItemModel::sibling(int row, int column, const QModelIndex \&index) const
Returns the sibling at row and column for the item at index, or an invalid QModelIndex if there is no sibling at that location.
sibling() is just a convenience function that finds the item's parent, and uses it to retrieve the index of the child item in the specified row and column.
This method can optionally be overridden for implementation-specific optimization.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
See also index(), QModelIndex::row(), and QModelIndex::column().
Upstream PySide2 reference signatures (binding differences may apply):
sibling(self, row: int, column: int, idx: PySide2.QtCore.QModelIndex) -> PySide2.QtCore.QModelIndex
Source: https://doc.qt.io/archives/qt-5.15/qabstractitemmodel.html#sibling
sort
sort(column: int, order: Any) -> None
X.sort(column, order)
Supplemental documentation: Qt 5 reference:
[virtual] void QAbstractItemModel::sort(int column, Qt::SortOrder order \= Qt::AscendingOrder)
Sorts the model by column in the given order.
The base class implementation does nothing.
Upstream PySide2 reference signatures (binding differences may apply):
sort(self, column: int, order: PySide2.QtCore.Qt.SortOrder=...) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractitemmodel.html#sort
span
span(index: Any) -> Any
X.span(index) -> PythonQt.QtCore.QSize
Supplemental documentation: Qt 5 reference:
[virtual] QSize QAbstractItemModel::span(const QModelIndex \&index) const
Returns the row and column span of the item represented by index.
Note: Currently, span is not used.
Upstream PySide2 reference signatures (binding differences may apply):
span(self, index: PySide2.QtCore.QModelIndex) -> PySide2.QtCore.QSize
Source: https://doc.qt.io/archives/qt-5.15/qabstractitemmodel.html#span
submit
submit() -> bool
X.submit() -> bool
Supplemental documentation: Qt 5 reference:
[virtual slot] bool QAbstractItemModel::submit()
Lets the model know that it should submit cached information to permanent storage. This function is typically used for row editing.
Returns true if there is no error; otherwise returns false.
See also revert().
Upstream PySide2 reference signatures (binding differences may apply):
submit(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qabstractitemmodel.html#submit
supportedDragActions
supportedDragActions() -> Any
X.supportedDragActions()
Supplemental documentation: Qt 5 reference:
[virtual] Qt::DropActions QAbstractItemModel::supportedDragActions() const
Returns the actions supported by the data in this model.
The default implementation returns supportedDropActions(). Reimplement this function if you wish to support additional actions.
supportedDragActions() is used by QAbstractItemView::startDrag() as the default values when a drag occurs.
See also setSupportedDragActions(), Qt::DropActions, and Using drag and drop with item views.
Upstream PySide2 reference signatures (binding differences may apply):
supportedDragActions(self) -> PySide2.QtCore.Qt.DropActions
Source: https://doc.qt.io/archives/qt-5.15/qabstractitemmodel.html#supportedDragActions
supportedDropActions
supportedDropActions() -> Any
X.supportedDropActions()
Supplemental documentation: Qt 5 reference:
[virtual] Qt::DropActions QAbstractItemModel::supportedDropActions() const
Returns the drop actions supported by this model.
The default implementation returns Qt::CopyAction. Reimplement this function if you wish to support additional actions. You must also reimplement the dropMimeData() function to handle the additional operations.
This function was introduced in Qt 4.2.
See also dropMimeData(), Qt::DropActions, and Using drag and drop with item views.
Upstream PySide2 reference signatures (binding differences may apply):
supportedDropActions(self) -> PySide2.QtCore.Qt.DropActions
Source: https://doc.qt.io/archives/qt-5.15/qabstractitemmodel.html#supportedDropActions