Skip to content

PythonQt.QtGui.QStandardItemModel · declarations 001

Back to PythonQt.QtGui.QStandardItemModel

appendColumn

appendColumn(items: Any) -> None

X.appendColumn(items)

Supplemental documentation: Qt 5 reference:

void QStandardItemModel::appendColumn(const QList\<QStandardItem *> \&items)

Appends a column containing items. If necessary, the row count is increased to the size of items.

This function was introduced in Qt 4.2.

See also insertColumn() and appendRow().

Upstream PySide2 reference signatures (binding differences may apply):

appendColumn(self, items: typing.Sequence[PySide2.QtGui.QStandardItem]) -> None

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#appendColumn

appendRow

appendRow(item: Any) -> None

X.appendRow(item)

Supplemental documentation: Qt 5 reference:

void QStandardItemModel::appendRow(const QList\<QStandardItem *> \&items)

Appends a row containing items. If necessary, the column count is increased to the size of items.

This function was introduced in Qt 4.2.

See also insertRow() and appendColumn().

void QStandardItemModel::appendRow(QStandardItem *item)

This is an overloaded function.

When building a list or a tree that has only one column, this function provides a convenient way to append a single new item.

This function was introduced in Qt 4.2.

Upstream PySide2 reference signatures (binding differences may apply):

appendRow(self, item: PySide2.QtGui.QStandardItem) -> None
appendRow(self, items: typing.Sequence[PySide2.QtGui.QStandardItem]) -> None

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#appendRow

clear

clear() -> None

X.clear()

Supplemental documentation: Qt 5 reference:

void QStandardItemModel::clear()

Removes all items (including header items) from the model and sets the number of rows and columns to zero.

See also removeColumns() and removeRows().

Upstream PySide2 reference signatures (binding differences may apply):

clear(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#clear

columnCount

columnCount(parent: Any) -> int

X.columnCount(parent) -> int

Supplemental documentation: Qt 5 reference:

[override virtual] int QStandardItemModel::columnCount(const QModelIndex \&parent \= QModelIndex()) const

Reimplements: QAbstractItemModel::columnCount(const QModelIndex \&parent) const.

See also setColumnCount().

Upstream PySide2 reference signatures (binding differences may apply):

columnCount(self, parent: PySide2.QtCore.QModelIndex=...) -> int

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#columnCount

columnsAboutToBeInserted

columnsAboutToBeInserted(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QStandardItemModel.columnsAboutToBeInserted; argument details are not documented.

columnsAboutToBeMoved

columnsAboutToBeMoved(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QStandardItemModel.columnsAboutToBeMoved; argument details are not documented.

columnsAboutToBeRemoved

columnsAboutToBeRemoved(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QStandardItemModel.columnsAboutToBeRemoved; argument details are not documented.

columnsInserted

columnsInserted(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QStandardItemModel.columnsInserted; argument details are not documented.

columnsMoved

columnsMoved(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QStandardItemModel.columnsMoved; argument details are not documented.

columnsRemoved

columnsRemoved(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QStandardItemModel.columnsRemoved; argument details are not documented.

data

data(index: Any, role: int) -> Any

X.data(index, role) -> object

Supplemental documentation: Qt 5 reference:

[override virtual] QVariant QStandardItemModel::data(const QModelIndex \&index, int role \= Qt::DisplayRole) const

Reimplements: QAbstractItemModel::data(const QModelIndex \&index, int role) const.

See also setData().

Upstream PySide2 reference signatures (binding differences may apply):

data(self, index: PySide2.QtCore.QModelIndex, role: int=...) -> typing.Any

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#data

dataChanged

dataChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QStandardItemModel.dataChanged; argument details are not documented.

destroyed

destroyed(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QStandardItemModel.destroyed; argument details are not documented.

dropMimeData

dropMimeData(data: Any, action: Any, row: int, column: int, parent: Any) -> bool

X.dropMimeData(data, action, row, column, parent) -> bool

Supplemental documentation: Qt 5 reference:

[override virtual] bool QStandardItemModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex \&parent)

Reimplements: QAbstractItemModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex \&parent).

Upstream PySide2 reference signatures (binding differences may apply):

dropMimeData(self, data: PySide2.QtCore.QMimeData, action: PySide2.QtCore.Qt.DropAction, row: int, column: int, parent: PySide2.QtCore.QModelIndex) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#dropMimeData

findItems

findItems(text: str, arg1: flags, column: int) -> tuple

X.findItems(text, flags, column) -> tuple

Supplemental documentation: Qt 5 reference:

QList\<QStandardItem *> QStandardItemModel::findItems(const QString \&text, Qt::MatchFlags flags \= Qt::MatchExactly, int column \= 0) const

Returns a list of items that match the given text, using the given flags, in the given column.

This function was introduced in Qt 4.2.

Upstream PySide2 reference signatures (binding differences may apply):

findItems(self, text: str, flags: PySide2.QtCore.Qt.MatchFlags=..., column: int=...) -> typing.List[PySide2.QtGui.QStandardItem]

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#findItems

flags

flags(index: Any) -> Any

X.flags(index)

Supplemental documentation: Qt 5 reference:

[override virtual] Qt::ItemFlags QStandardItemModel::flags(const QModelIndex \&index) const

Reimplements: QAbstractItemModel::flags(const QModelIndex \&index) const.

Upstream PySide2 reference signatures (binding differences may apply):

flags(self, index: PySide2.QtCore.QModelIndex) -> PySide2.QtCore.Qt.ItemFlags

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#flags

hasChildren

hasChildren(parent: Any) -> bool

X.hasChildren(parent) -> bool

Supplemental documentation: Qt 5 reference:

[override virtual] bool QStandardItemModel::hasChildren(const QModelIndex \&parent \= QModelIndex()) const

Reimplements: QAbstractItemModel::hasChildren(const QModelIndex \&parent) const.

Upstream PySide2 reference signatures (binding differences may apply):

hasChildren(self, parent: PySide2.QtCore.QModelIndex=...) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#hasChildren

headerData

headerData(section: int, orientation: Any, role: int) -> Any

X.headerData(section, orientation, role) -> object

Supplemental documentation: Qt 5 reference:

[override virtual] QVariant QStandardItemModel::headerData(int section, Qt::Orientation orientation, int role \= Qt::DisplayRole) const

Reimplements: QAbstractItemModel::headerData(int section, Qt::Orientation orientation, int role) const.

See also setHeaderData().

Upstream PySide2 reference signatures (binding differences may apply):

headerData(self, section: int, orientation: PySide2.QtCore.Qt.Orientation, role: int=...) -> typing.Any

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#headerData

headerDataChanged

headerDataChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QStandardItemModel.headerDataChanged; argument details are not documented.

horizontalHeaderItem

horizontalHeaderItem(column: int) -> Any

X.horizontalHeaderItem(column) -> PythonQt.QtGui.QStandardItem

Supplemental documentation: Qt 5 reference:

QStandardItem *QStandardItemModel::horizontalHeaderItem(int column) const

Returns the horizontal header item for column if one has been set; otherwise returns nullptr.

This function was introduced in Qt 4.2.

See also setHorizontalHeaderItem() and verticalHeaderItem().

Upstream PySide2 reference signatures (binding differences may apply):

horizontalHeaderItem(self, column: int) -> PySide2.QtGui.QStandardItem

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#horizontalHeaderItem

index

index(row: int, column: int, parent: Any) -> Any

X.index(row, column, parent) -> PythonQt.QtCore.QModelIndex

Supplemental documentation: Qt 5 reference:

[override virtual] QModelIndex QStandardItemModel::index(int row, int column, const QModelIndex \&parent \= QModelIndex()) const

Reimplements: QAbstractItemModel::index(int row, int column, const QModelIndex \&parent) const.

Upstream PySide2 reference signatures (binding differences may apply):

index(self, row: int, column: int, parent: PySide2.QtCore.QModelIndex=...) -> PySide2.QtCore.QModelIndex

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#index

indexFromItem

indexFromItem(item: Any) -> Any

X.indexFromItem(item) -> PythonQt.QtCore.QModelIndex

Supplemental documentation: Qt 5 reference:

QModelIndex QStandardItemModel::indexFromItem(const QStandardItem *item) const

Returns the QModelIndex associated with the given item.

Use this function when you want to perform an operation that requires the QModelIndex of the item, such as QAbstractItemView::scrollTo(). QStandardItem::index() is provided as convenience; it is equivalent to calling this function.

This function was introduced in Qt 4.2.

See also itemFromIndex() and QStandardItem::index().

Upstream PySide2 reference signatures (binding differences may apply):

indexFromItem(self, item: PySide2.QtGui.QStandardItem) -> PySide2.QtCore.QModelIndex

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#indexFromItem

insertColumn

insertColumn(column: int, items: Any) -> Any

X.insertColumn(column, items)

Supplemental documentation: Qt 5 reference:

void QStandardItemModel::insertColumn(int column, const QList\<QStandardItem *> \&items)

Inserts a column at column containing items. If necessary, the row count is increased to the size of items.

This function was introduced in Qt 4.2.

See also takeColumn(), appendColumn(), and insertRow().

bool QStandardItemModel::insertColumn(int column, const QModelIndex \&parent \= QModelIndex())

Inserts a single column before the given column in the child items of the parent specified. Returns true if the column is inserted; otherwise returns false.

See also insertColumns(), insertRow(), and removeColumn().

Upstream PySide2 reference signatures (binding differences may apply):

insertColumn(self, column: int, items: typing.Sequence[PySide2.QtGui.QStandardItem]) -> None
insertColumn(self, column: int, parent: PySide2.QtCore.QModelIndex=...) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#insertColumn

insertColumns

insertColumns(column: int, count: int, parent: Any) -> bool

X.insertColumns(column, count, parent) -> bool

Supplemental documentation: Qt 5 reference:

[override virtual] bool QStandardItemModel::insertColumns(int column, int count, const QModelIndex \&parent \= QModelIndex())

Reimplements: QAbstractItemModel::insertColumns(int column, int count, const QModelIndex \&parent).

Upstream PySide2 reference signatures (binding differences may apply):

insertColumns(self, column: int, count: int, parent: PySide2.QtCore.QModelIndex=...) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#insertColumns

insertRow

insertRow(row: int, item: Any) -> Any

X.insertRow(row, item)

Supplemental documentation: Qt 5 reference:

void QStandardItemModel::insertRow(int row, const QList\<QStandardItem *> \&items)

Inserts a row at row containing items. If necessary, the column count is increased to the size of items.

This function was introduced in Qt 4.2.

See also takeRow(), appendRow(), and insertColumn().

void QStandardItemModel::insertRow(int row, QStandardItem *item)

This is an overloaded function.

Inserts a row at row containing item.

When building a list or a tree that has only one column, this function provides a convenient way to append a single new item.

This function was introduced in Qt 4.2.

bool QStandardItemModel::insertRow(int row, const QModelIndex \&parent \= QModelIndex())

Inserts a single row before the given row in the child items of the parent specified. Returns true if the row is inserted; otherwise returns false.

See also insertRows(), insertColumn(), and removeRow().

Upstream PySide2 reference signatures (binding differences may apply):

insertRow(self, row: int, item: PySide2.QtGui.QStandardItem) -> None
insertRow(self, row: int, items: typing.Sequence[PySide2.QtGui.QStandardItem]) -> None
insertRow(self, row: int, parent: PySide2.QtCore.QModelIndex=...) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#insertRow

insertRows

insertRows(row: int, count: int, parent: Any) -> bool

X.insertRows(row, count, parent) -> bool

Supplemental documentation: Qt 5 reference:

[override virtual] bool QStandardItemModel::insertRows(int row, int count, const QModelIndex \&parent \= QModelIndex())

Reimplements: QAbstractItemModel::insertRows(int row, int count, const QModelIndex \&parent).

Upstream PySide2 reference signatures (binding differences may apply):

insertRows(self, row: int, count: int, parent: PySide2.QtCore.QModelIndex=...) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#insertRows

invisibleRootItem

invisibleRootItem() -> Any

X.invisibleRootItem() -> PythonQt.QtGui.QStandardItem

Supplemental documentation: Qt 5 reference:

QStandardItem *QStandardItemModel::invisibleRootItem() const

Returns the model's invisible root item.

The invisible root item provides access to the model's top-level items through the QStandardItem API, making it possible to write functions that can treat top-level items and their children in a uniform way; for example, recursive functions involving a tree model.

Note: Calling index() on the QStandardItem object retrieved from this function is not valid.

This function was introduced in Qt 4.2.

Upstream PySide2 reference signatures (binding differences may apply):

invisibleRootItem(self) -> PySide2.QtGui.QStandardItem

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#invisibleRootItem

item

item(row: int, column: int) -> Any

X.item(row, column) -> PythonQt.QtGui.QStandardItem

Supplemental documentation: Qt 5 reference:

QStandardItem *QStandardItemModel::item(int row, int column \= 0) const

Returns the item for the given row and column if one has been set; otherwise returns nullptr.

This function was introduced in Qt 4.2.

See also setItem(), takeItem(), and itemFromIndex().

Upstream PySide2 reference signatures (binding differences may apply):

item(self, row: int, column: int=...) -> PySide2.QtGui.QStandardItem

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#item

itemChanged

itemChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QStandardItemModel.itemChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QStandardItemModel::itemChanged(QStandardItem *item)

This signal is emitted whenever the data of item has changed.

This function was introduced in Qt 4.2.

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#itemChanged

itemData

itemData(index: Any) -> dict

X.itemData(index) -> dict

Supplemental documentation: Qt 5 reference:

[override virtual] QMap\<int, QVariant> QStandardItemModel::itemData(const QModelIndex \&index) const

Reimplements: QAbstractItemModel::itemData(const QModelIndex \&index) const.

See also setItemData().

Upstream PySide2 reference signatures (binding differences may apply):

itemData(self, index: PySide2.QtCore.QModelIndex) -> typing.Dict[int, typing.Any]

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#itemData

itemFromIndex

itemFromIndex(index: Any) -> Any

X.itemFromIndex(index) -> PythonQt.QtGui.QStandardItem

Supplemental documentation: Qt 5 reference:

QStandardItem *QStandardItemModel::itemFromIndex(const QModelIndex \&index) const

Returns a pointer to the QStandardItem associated with the given index.

Calling this function is typically the initial step when processing QModelIndex-based signals from a view, such as QAbstractItemView::activated(). In your slot, you call itemFromIndex(), with the QModelIndex carried by the signal as argument, to obtain a pointer to the corresponding QStandardItem.

Note that this function will lazily create an item for the index (using itemPrototype()), and set it in the parent item's child table, if no item already exists at that index.

If index is an invalid index, this function returns nullptr.

This function was introduced in Qt 4.2.

See also indexFromItem().

Upstream PySide2 reference signatures (binding differences may apply):

itemFromIndex(self, index: PySide2.QtCore.QModelIndex) -> PySide2.QtGui.QStandardItem

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#itemFromIndex

itemPrototype

itemPrototype() -> Any

X.itemPrototype() -> PythonQt.QtGui.QStandardItem

Supplemental documentation: Qt 5 reference:

const QStandardItem *QStandardItemModel::itemPrototype() const

Returns the item prototype used by the model. The model uses the item prototype as an item factory when it needs to construct new items on demand (for instance, when a view or item delegate calls setData()).

This function was introduced in Qt 4.2.

See also setItemPrototype().

Upstream PySide2 reference signatures (binding differences may apply):

itemPrototype(self) -> PySide2.QtGui.QStandardItem

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#itemPrototype

layoutAboutToBeChanged

layoutAboutToBeChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QStandardItemModel.layoutAboutToBeChanged; argument details are not documented.

layoutChanged

layoutChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QStandardItemModel.layoutChanged; argument details are not documented.

mimeData

mimeData(indexes: Any) -> Any

X.mimeData(indexes) -> PythonQt.QtCore.QMimeData

Supplemental documentation: Qt 5 reference:

[override virtual] QMimeData *QStandardItemModel::mimeData(const QModelIndexList \&indexes) const

Reimplements: QAbstractItemModel::mimeData(const QModelIndexList \&indexes) const.

Upstream PySide2 reference signatures (binding differences may apply):

mimeData(self, indexes: typing.List[int]) -> PySide2.QtCore.QMimeData

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#mimeData

mimeTypes

mimeTypes() -> tuple

X.mimeTypes() -> tuple

Supplemental documentation: Qt 5 reference:

[override virtual] QStringList QStandardItemModel::mimeTypes() const

Reimplements: QAbstractItemModel::mimeTypes() const.

Upstream PySide2 reference signatures (binding differences may apply):

mimeTypes(self) -> typing.List[str]

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#mimeTypes

modelAboutToBeReset

modelAboutToBeReset(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QStandardItemModel.modelAboutToBeReset; argument details are not documented.

modelReset

modelReset(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QStandardItemModel.modelReset; argument details are not documented.

objectNameChanged

objectNameChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QStandardItemModel.objectNameChanged; argument details are not documented.

parent

parent(child: Any) -> Any

X.parent(child) -> PythonQt.QtCore.QModelIndex

Supplemental documentation: Qt 5 reference:

[override virtual] QModelIndex QStandardItemModel::parent(const QModelIndex \&child) const

Reimplements: QAbstractItemModel::parent(const QModelIndex \&index) const.

Upstream PySide2 reference signatures (binding differences may apply):

parent(self) -> PySide2.QtCore.QObject
parent(self, child: PySide2.QtCore.QModelIndex) -> PySide2.QtCore.QModelIndex

Source: https://doc.qt.io/archives/qt-5.15/qstandarditemmodel.html#parent