Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QModelIndex Class Reference

\inmodule QtCore More...

#include <qabstractitemmodel.h>

+ Collaboration diagram for QModelIndex:

Public Member Functions

constexpr QModelIndex () noexcept
 Creates a new empty model index.
 
constexpr int row () const noexcept
 Returns the row this model index refers to.
 
constexpr int column () const noexcept
 Returns the column this model index refers to.
 
constexpr quintptr internalId () const noexcept
 Returns a {quintptr} used by the model to associate the index with the internal data structure.
 
voidinternalPointer () const noexcept
 Returns a {void} {*} pointer used by the model to associate the index with the internal data structure.
 
const voidconstInternalPointer () const noexcept
 Returns a {const void} {*} pointer used by the model to associate the index with the internal data structure.
 
QModelIndex parent () const
 Returns the parent of the model index, or QModelIndex() if it has no parent.
 
QModelIndex sibling (int row, int column) const
 Returns the sibling at row and column.
 
QModelIndex siblingAtColumn (int column) const
 Returns the sibling at column for the current row.
 
QModelIndex siblingAtRow (int row) const
 Returns the sibling at row for the current column.
 
QVariant data (int role=Qt::DisplayRole) const
 Returns the data for the given role for the item referred to by the index.
 
void multiData (QModelRoleDataSpan roleDataSpan) const
 
Qt::ItemFlags flags () const
 
constexpr const QAbstractItemModelmodel () const noexcept
 Returns a pointer to the model containing the item that this index refers to.
 
constexpr bool isValid () const noexcept
 Returns {true} if this model index is valid; otherwise returns {false}.
 
constexpr bool operator== (const QModelIndex &other) const noexcept
 Returns {true} if this model index refers to the same location as the other model index; otherwise returns {false}.
 
constexpr bool operator!= (const QModelIndex &other) const noexcept
 Returns {true} if this model index does not refer to the same location as the other model index; otherwise returns {false}.
 
constexpr bool operator< (const QModelIndex &other) const noexcept
 

Friends

class QAbstractItemModel
 

Related Symbols

(Note that these are not member symbols.)

 QModelIndexList
 Synonym for QList<QModelIndex>.
 

Detailed Description

\inmodule QtCore

The QModelIndex class is used to locate data in a data model.

This class is used as an index into item models derived from QAbstractItemModel. The index is used by item views, delegates, and selection models to locate an item in the model.

New QModelIndex objects are created by the model using the QAbstractItemModel::createIndex() function. An invalid model index can be constructed with the QModelIndex constructor. Invalid indexes are often used as parent indexes when referring to top-level items in a model.

Model indexes refer to items in models, and contain all the information required to specify their locations in those models. Each index is located in a given row and column, and may have a parent index; use row(), column(), and parent() to obtain this information. Each top-level item in a model is represented by a model index that does not have a parent index - in this case, parent() will return an invalid model index, equivalent to an index constructed with the zero argument form of the QModelIndex() constructor.

To obtain a model index that refers to an existing item in a model, call QAbstractItemModel::index() with the required row and column values, and the model index of the parent. When referring to top-level items in a model, supply QModelIndex() as the parent index.

The model() function returns the model that the index references as a QAbstractItemModel. The child() function is used to examine items held under the index in the model. The sibling() function allows you to traverse items in the model on the same level as the index.

Note
Model indexes should be used immediately and then discarded. You should not rely on indexes to remain valid after calling model functions that change the structure of the model or delete items. If you need to keep a model index over time use a QPersistentModelIndex.
See also
{Model/View Programming}, QPersistentModelIndex, QAbstractItemModel

Definition at line 123 of file qabstractitemmodel.h.

Constructor & Destructor Documentation

◆ QModelIndex()

QModelIndex::QModelIndex ( )
inlineconstexprnoexcept

Creates a new empty model index.

This type of model index is used to indicate that the position in the model is invalid.

See also
isValid(), QAbstractItemModel

Definition at line 127 of file qabstractitemmodel.h.

Referenced by parent(), sibling(), siblingAtColumn(), and siblingAtRow().

+ Here is the caller graph for this function:

Member Function Documentation

◆ column()

int QModelIndex::column ( ) const
inlineconstexprnoexcept

Returns the column this model index refers to.

Definition at line 130 of file qabstractitemmodel.h.

Referenced by QStandardItemModelPrivate::_q_emitItemChanged(), QSortFilterProxyModelPrivate::can_create_mapping(), QQuickTreeView::cellAtIndex(), QPersistentModelIndex::column(), QAbstractItemModelPrivate::columnsAboutToBeRemoved(), QAbstractItemViewPrivate::columnsAboutToBeRemoved(), QAbstractItemModelPrivate::columnsInserted(), QAbstractItemModelPrivate::columnsRemoved(), QSortFilterProxyModelPrivate::create_mapping_recursive(), QHeaderView::currentChanged(), QTableWidget::currentColumn(), QTreeWidget::currentColumn(), QAbstractItemModelTesterPrivate::dataChanged(), QListWidgetPrivate::dataChanged(), QTableWidgetPrivate::dataChanged(), QTreeWidgetPrivate::dataChanged(), QIconModeViewBase::dataChanged(), QAbstractItemView::dataChanged(), QHeaderView::dataChanged(), QTreeView::dataChanged(), QQuickTreeViewPrivate::dataChangedCallback(), QTableWidgetPrivate::emitCurrentItemChanged(), QTreeView::indexAt(), indexesFromRange(), QTreeModel::insertColumns(), QTreeModel::insertRows(), QAbstractItemViewPrivate::intersectedRect(), QTableViewPrivate::intersectedRect(), QTreeViewPrivate::intersectedRect(), QCompletionModel::mapFromSource(), mergeIndexes(), QTableView::moveCursor(), QTreeView::moveCursor(), operator<<(), qContainsIndex(), QPdfBookmarkModel::rowCount(), rowLengthsFromRange(), QItemSelectionModelPrivate::rowsAboutToBeRemoved(), QAbstractItemView::rowsAboutToBeRemoved(), QAbstractItemModelPrivate::rowsInserted(), QTreeView::rowsInserted(), QAbstractItemModelPrivate::rowsRemoved(), QItemSelection::select(), QFileSystemModel::setData(), QTableView::setSelection(), QFileDialogComboBox::showPopup(), QAbstractItemModel::sibling(), QConcatenateTablesProxyModelPrivate::slotDataChanged(), QAbstractItemViewPrivate::updateEditorData(), and MainWindow::updateSelection().

◆ constInternalPointer()

const void * QModelIndex::constInternalPointer ( ) const
inlinenoexcept

Returns a {const void} {*} pointer used by the model to associate the index with the internal data structure.

See also
QAbstractItemModel::createIndex()

Definition at line 133 of file qabstractitemmodel.h.

References i.

Referenced by QPersistentModelIndex::constInternalPointer().

+ Here is the caller graph for this function:

◆ data()

QVariant QModelIndex::data ( int role = Qt::DisplayRole) const
inline

Returns the data for the given role for the item referred to by the index.

Definition at line 492 of file qabstractitemmodel.h.

References QVariant::data().

Referenced by QPersistentModelIndex::data(), QFileSystemModel::setData(), QFileDialogComboBox::setHistory(), and QFileDialogComboBox::showPopup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ flags()

Qt::ItemFlags QModelIndex::flags ( ) const
inline
Since
4.2

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

Definition at line 498 of file qabstractitemmodel.h.

Referenced by QAbstractItemView::currentChanged(), QComboBoxPrivateContainer::eventFilter(), QPersistentModelIndex::flags(), QTreeViewPrivate::hasVisibleChildren(), QTreeViewPrivate::isIndexExpanded(), and QComboBoxPrivate::trySetValidIndex().

+ Here is the caller graph for this function:

◆ internalId()

quintptr QModelIndex::internalId ( ) const
inlineconstexprnoexcept

Returns a {quintptr} used by the model to associate the index with the internal data structure.

See also
QAbstractItemModel::createIndex()

Definition at line 131 of file qabstractitemmodel.h.

References i.

Referenced by QPersistentModelIndex::internalId(), and QTreeViewPrivate::viewIndex().

+ Here is the caller graph for this function:

◆ internalPointer()

void * QModelIndex::internalPointer ( ) const
inlinenoexcept

Returns a {void} {*} pointer used by the model to associate the index with the internal data structure.

See also
QAbstractItemModel::createIndex()

Definition at line 132 of file qabstractitemmodel.h.

References i.

Referenced by QDeclarativeSupportedCategoriesModel::index(), QPdfBookmarkModel::index(), QPersistentModelIndex::internalPointer(), operator<<(), QDeclarativeSupportedCategoriesModel::rowCount(), QPdfBookmarkModel::rowCount(), and QFileSystemModel::sibling().

+ Here is the caller graph for this function:

◆ isValid()

bool QModelIndex::isValid ( ) const
inlineconstexprnoexcept

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(), column()

Definition at line 142 of file qabstractitemmodel.h.

Referenced by QSortFilterProxyModelPrivate::_q_sourceColumnsInserted(), QSortFilterProxyModelPrivate::_q_sourceColumnsRemoved(), QSortFilterProxyModelPrivate::_q_sourceDataChanged(), QSortFilterProxyModelPrivate::_q_sourceRowsAboutToBeInserted(), QAbstractItemModel::beginMoveColumns(), QAbstractItemModel::beginMoveRows(), QSortFilterProxyModelPrivate::can_create_mapping(), QAbstractItemModel::changePersistentIndex(), QAbstractItemModel::checkIndex(), QItemSelectionModel::clearCurrentIndex(), QQmlTreeModelToTableModel::collapse(), QConcatenateTablesProxyModel::columnCount(), QSortFilterProxyModel::columnCount(), QHeaderDataProxyModel::columnCount(), QAbstractItemModelPrivate::columnsAboutToBeRemoved(), QAbstractItemViewPrivate::columnsAboutToBeRemoved(), QCompleter::complete(), QSortFilterProxyModelPrivate::create_mapping(), QSortFilterProxyModelPrivate::create_mapping_recursive(), QHeaderView::currentChanged(), QAbstractItemView::currentChanged(), QFontListView::currentChanged(), QListView::currentChanged(), QTableView::currentChanged(), QTreeView::currentChanged(), QQuickTableViewPrivate::currentChangedInSelectionModel(), QAbstractItemModelTesterPrivate::dataChanged(), QListWidgetPrivate::dataChanged(), QTableWidgetPrivate::dataChanged(), QTreeWidgetPrivate::dataChanged(), QAbstractItemView::dataChanged(), QTreeView::drawRow(), QAbstractItemView::event(), QComboBoxPrivateContainer::eventFilter(), QQmlTreeModelToTableModel::expand(), QFileSystemModelPrivate::filePath(), QAbstractItemView::focusInEvent(), QTreeModel::hasChildren(), QSortFilterProxyModel::hasChildren(), QCompletionModel::hasChildren(), QHeaderDataProxyModel::hasChildren(), QCompletionModel::index(), QTreeModel::index(), QUndoModel::index(), QPdfBookmarkModel::index(), QTreeView::indexAt(), QTreeView::indexRowSizeHint(), QAbstractItemView::inputMethodQuery(), QSortFilterProxyModelPrivate::insert_source_items(), QSortFilterProxyModel::insertColumns(), QSortFilterProxyModel::insertRows(), QQuickFolderListModel::isFolder(), QPersistentModelIndex::isValid(), QTableModel::itemChanged(), QAbstractItemView::keyboardSearch(), QTreeView::keyboardSearch(), QQmlTreeModelToTableModel::lastChildIndex(), QTreeViewPrivate::layout(), QCompletionModel::mapFromSource(), QAbstractItemModel::match(), QIdentityProxyModel::moveColumns(), QListView::moveCursor(), QTableView::moveCursor(), QTreeView::moveCursor(), QIdentityProxyModel::moveRows(), QStringListModel::moveRows(), QListModel::moveRows(), QListView::paintEvent(), QAbstractItemModelTesterPrivate::parent(), QCompleter::pathFromIndex(), QSortFilterProxyModelPrivate::recursiveParentAcceptsRow(), QSortFilterProxyModelPrivate::remove_source_items(), QSortFilterProxyModel::removeColumns(), QSortFilterProxyModel::removeRows(), QCompletionModel::rowCount(), QTreeModel::rowCount(), QConcatenateTablesProxyModel::rowCount(), QSortFilterProxyModel::rowCount(), QUndoModel::rowCount(), QHeaderDataProxyModel::rowCount(), QPdfBookmarkModel::rowCount(), QAbstractItemModelPrivate::rowsAboutToBeRemoved(), QAbstractItemModelTesterPrivate::rowsAboutToBeRemoved(), QAbstractItemView::rowsAboutToBeRemoved(), QTreeView::rowsInserted(), QTreeView::scrollTo(), QTreeViewPrivate::select(), QItemSelection::select(), QListViewPrivate::selectAll(), QListViewPrivate::selection(), QFileSystemModel::setData(), QFileDialogComboBox::setHistory(), QQuickTableViewPrivate::setSelectedOnDelegateItem(), QListView::setSelection(), QTableView::setSelection(), QTreeView::setSelection(), QQmlTreeModelToTableModel::showModelChildItems(), QComboBox::showPopup(), QFileDialogComboBox::showPopup(), QStringListModel::sibling(), QConcatenateTablesProxyModelPrivate::slotDataChanged(), QIdentityProxyModelPrivate::sourceDataChanged(), QQmlTreeModelToTableModel::testConsistency(), QAbstractItemView::timerEvent(), QCalendarWidget::updateCell(), QAbstractItemViewPrivate::updateEditorData(), QFileDialogPrivate::updateOkButton(), and QTreeViewPrivate::viewIndex().

◆ model()

const QAbstractItemModel * QModelIndex::model ( ) const
inlineconstexprnoexcept

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.

Definition at line 141 of file qabstractitemmodel.h.

Referenced by QSortFilterProxyModel::buddy(), QAbstractProxyModel::canDropMimeData(), QQmlTreeModelToTableModel::collapse(), QAbstractItemView::currentChanged(), QQuickTableViewPrivate::currentChangedInSelectionModel(), QTreeView::drawRow(), QAbstractProxyModel::dropMimeData(), QFileDialogPrivate::enterDirectory(), QQmlTreeModelToTableModel::expand(), QTreeView::expandRecursively(), QSortFilterProxyModel::filterAcceptsRow(), QComboBox::findData(), QIdentityProxyModel::index(), QTreeView::indexRowSizeHint(), QTreeView::isFirstColumnSpanned(), QComboBox::itemData(), QComboBox::itemIcon(), QComboBox::itemText(), QSortFilterProxyModel::mimeData(), QPersistentModelIndex::model(), QAbstractItemView::mouseMoveEvent(), QIdentityProxyModel::moveColumns(), QListView::moveCursor(), QTableView::moveCursor(), QIdentityProxyModel::moveRows(), operator<<(), QTableView::paintEvent(), QTreeView::scrollTo(), QItemSelection::select(), QFileDialog::selectFile(), QComboBox::setCurrentIndex(), QFileDialog::setDirectory(), QTreeView::setFirstColumnSpanned(), QTreeView::setRowHidden(), QQuickTableViewPrivate::setSelectedOnDelegateItem(), QTableView::setSelection(), QComboBox::showPopup(), QAbstractItemView::sizeHintForColumn(), QTableView::sizeHintForColumn(), QAbstractItemView::sizeHintForRow(), QTableView::sizeHintForRow(), QIdentityProxyModelPrivate::sourceDataChanged(), QListView::updateGeometries(), QTreeView::verticalScrollbarValueChanged(), QListView::viewportSizeHint(), QListView::visualRegionForSelection(), and QTreeView::visualRegionForSelection().

+ Here is the caller graph for this function:

◆ multiData()

void QModelIndex::multiData ( QModelRoleDataSpan roleDataSpan) const
inline
Since
6.0

Populates the given roleDataSpan for the item referred to by the index.

Definition at line 495 of file qabstractitemmodel.h.

Referenced by QPersistentModelIndex::multiData().

+ Here is the caller graph for this function:

◆ operator!=()

bool QModelIndex::operator!= ( const QModelIndex & other) const
inlineconstexprnoexcept

Returns {true} if this model index does not refer to the same location as the other model index; otherwise returns {false}.

Definition at line 145 of file qabstractitemmodel.h.

References other().

+ Here is the call graph for this function:

◆ operator<()

bool QModelIndex::operator< ( const QModelIndex & other) const
inlineconstexprnoexcept
Since
4.1

Returns {true} if this model index is smaller than the other model index; otherwise returns {false}.

The less than calculation is not directly useful to developers - the way that indexes with different parents compare is not defined. This operator only exists so that the class can be used with QMap.

Definition at line 147 of file qabstractitemmodel.h.

References i, and other().

+ Here is the call graph for this function:

◆ operator==()

bool QModelIndex::operator== ( const QModelIndex & other) const
inlineconstexprnoexcept

Returns {true} if this model index refers to the same location as the other model index; otherwise returns {false}.

The internal data pointer, row, column, and model values are used when comparing with another model index.

Definition at line 143 of file qabstractitemmodel.h.

References i, and other().

+ Here is the call graph for this function:

◆ parent()

QModelIndex QModelIndex::parent ( ) const
inline

Returns the parent of the model index, or QModelIndex() if it has no parent.

See also
sibling(), model()

Definition at line 480 of file qabstractitemmodel.h.

References QModelIndex(), and parent().

Referenced by QStandardItemModelPrivate::_q_emitItemChanged(), QSortFilterProxyModelPrivate::_q_sourceDataChanged(), QSortFilterProxyModelPrivate::_q_sourceRowsAboutToBeInserted(), QSortFilterProxyModelPrivate::_q_sourceRowsRemoved(), QAbstractItemModel::beginMoveColumns(), QAbstractItemModel::beginMoveRows(), QSortFilterProxyModelPrivate::can_create_mapping(), QAbstractItemModel::checkIndex(), QAbstractItemViewPrivate::clearOrRemove(), QAbstractItemModelPrivate::columnsAboutToBeRemoved(), QAbstractItemViewPrivate::columnsAboutToBeRemoved(), QRowsRemoval::contains(), QSortFilterProxyModelPrivate::create_mapping(), QSortFilterProxyModelPrivate::create_mapping_recursive(), QHeaderView::currentChanged(), QAbstractItemModelTesterPrivate::dataChanged(), QTreeWidgetPrivate::dataChanged(), QComboBoxPrivate::dataChanged(), QDataWidgetMapperPrivate::dataChanged(), QAbstractItemView::dataChanged(), QTreeView::drawBranches(), QTreeView::drawRow(), QAbstractItemModel::endMoveColumns(), QAbstractItemModel::endMoveRows(), QFileSystemModelPrivate::filePath(), QTreeView::indexRowSizeHint(), QAbstractItemViewPrivate::intersectedRect(), QTreeViewPrivate::intersectedRect(), QAbstractItemView::keyboardSearch(), QQmlTreeModelToTableModel::lastChildIndex(), QCompletionModel::mapFromSource(), mergeIndexes(), QTreeView::moveCursor(), parent(), QPersistentModelIndex::parent(), QItemSelectionRange::parent(), QQmlItemSelectionRangeValueType::parent(), QIdentityProxyModel::parent(), QCompleter::pathFromIndex(), qt_PersistentModelIndexLessThan(), QSortFilterProxyModelPrivate::recursiveParentAcceptsRow(), QAbstractItemModelPrivate::rowsAboutToBeRemoved(), QAbstractItemView::rowsAboutToBeRemoved(), QTreeView::scrollTo(), QTreeViewPrivate::select(), QItemSelection::select(), QTreeView::selectAll(), QTreeView::selectedIndexes(), QItemSelectionModel::selectedRows(), QQmlTreeModelToTableModel::selectionForRowRange(), QFileDialogComboBox::showPopup(), QAbstractProxyModel::sibling(), QFileSystemModel::sibling(), QSortFilterProxyModelPrivate::source_to_proxy(), QAbstractItemViewPrivate::updateEditorData(), QListView::visualRegionForSelection(), and QTreeView::visualRegionForSelection().

+ Here is the call graph for this function:

◆ row()

int QModelIndex::row ( ) const
inlineconstexprnoexcept

Returns the row this model index refers to.

Definition at line 129 of file qabstractitemmodel.h.

Referenced by QCompleterPrivate::_q_complete(), QStandardItemModelPrivate::_q_emitItemChanged(), QSortFilterProxyModelPrivate::_q_sourceRowsAboutToBeInserted(), QAbstractItemModelPrivate::allowMove(), QAbstractItemModel::beginMoveColumns(), QAbstractItemModel::beginMoveRows(), QSortFilterProxyModelPrivate::can_create_mapping(), QQuickTreeView::cellAtIndex(), QItemSelectionModelPrivate::columnsAboutToBeRemoved(), QAbstractItemViewPrivate::columnsAboutToBeRemoved(), QAbstractItemModelPrivate::columnsInserted(), QAbstractItemModelPrivate::columnsRemoved(), QItemSelectionRange::contains(), QRowsRemoval::contains(), QSortFilterProxyModelPrivate::create_mapping_recursive(), QHeaderView::currentChanged(), QAbstractItemView::currentChanged(), QFontListView::currentChanged(), QFontListView::currentItem(), QListWidget::currentRow(), QTableWidget::currentRow(), QFontListView::currentText(), QAbstractItemModelTesterPrivate::dataChanged(), QListWidgetPrivate::dataChanged(), QTableWidgetPrivate::dataChanged(), QTreeWidgetPrivate::dataChanged(), QComboBoxPrivate::dataChanged(), QIconModeViewBase::dataChanged(), QAbstractItemView::dataChanged(), QHeaderView::dataChanged(), QTreeView::dataChanged(), QQuickTreeViewPrivate::dataChangedCallback(), QTreeView::drawBranches(), QTreeView::drawRow(), QListWidgetPrivate::emitCurrentItemChanged(), QTableWidgetPrivate::emitCurrentItemChanged(), QTreeModel::emitDataChanged(), QTreeModel::ensureSorted(), QComboBox::findData(), QListWidget::findItems(), QTreeView::indexAt(), indexesFromRange(), QAbstractItemViewPrivate::intersectedRect(), QTableViewPrivate::intersectedRect(), QTreeViewPrivate::intersectedRect(), QQmlTreeModelToTableModel::lastChildIndex(), QInputDialogPrivate::listViewText(), QAbstractProxyModelPrivate::mapDropCoordinatesToSource(), QCompletionModel::mapFromSource(), QAbstractItemModel::match(), mergeIndexes(), QConcatenateTablesProxyModel::mimeData(), QListModel::mimeData(), QListView::moveCursor(), QTableView::moveCursor(), QTreeView::moveCursor(), operator<<(), QSqlQueryModelPrivate::prefetch(), qContainsIndex(), QSortFilterProxyModelPrivate::recursiveParentAcceptsRow(), QPersistentModelIndex::row(), rowLengthsFromRange(), QAbstractItemModelPrivate::rowsAboutToBeRemoved(), QAbstractItemView::rowsAboutToBeRemoved(), QAbstractItemModelPrivate::rowsInserted(), QAbstractItemModelPrivate::rowsRemoved(), QTreeViewPrivate::select(), QItemSelection::select(), QTreeView::selectAll(), QListWidget::selectedItems(), QListViewPrivate::selection(), QTableViewPrivate::selectRow(), QTableView::setSelection(), QFileDialogComboBox::showPopup(), QAbstractItemModel::sibling(), QFileSystemModel::sibling(), QQmlTreeModelToTableModel::testConsistency(), QSortFilterProxyModelPrivate::updateChildrenMapping(), QAbstractItemViewPrivate::updateEditorData(), MainWindow::updateSelection(), QListModeViewBase::verticalScrollToValue(), QTreeViewPrivate::viewIndex(), and QListView::visualRegionForSelection().

◆ sibling()

QModelIndex QModelIndex::sibling ( int row,
int column ) const
inline

Returns the sibling at row and column.

If there is no sibling at this position, an invalid QModelIndex is returned.

See also
parent(), siblingAtColumn(), siblingAtRow()

Definition at line 483 of file qabstractitemmodel.h.

References QModelIndex().

Referenced by QCompleterPrivate::_q_complete(), QTreeView::indexAbove(), QTreeView::indexAt(), QTreeView::indexBelow(), indexesFromRange(), QAbstractItemView::keyboardSearch(), QTreeView::keyboardSearch(), QQmlTreeModelToTableModel::lastChildIndex(), QAbstractItemModel::match(), QTreeViewPrivate::modelIndex(), QTreeView::moveCursor(), rowLengthsFromRange(), QTreeViewPrivate::select(), QItemSelection::select(), QTreeView::selectAll(), QComboBoxPrivate::setCurrentIndex(), QTreeView::setSelection(), QPersistentModelIndex::sibling(), and QTreeViewPrivate::viewIndex().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ siblingAtColumn()

QModelIndex QModelIndex::siblingAtColumn ( int column) const
inline

Returns the sibling at column for the current row.

If there is no sibling at this position, an invalid QModelIndex is returned.

See also
sibling(), siblingAtRow()
Since
5.11

Definition at line 486 of file qabstractitemmodel.h.

References QModelIndex().

Referenced by QConcatenateTablesProxyModelPrivate::slotDataChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ siblingAtRow()

QModelIndex QModelIndex::siblingAtRow ( int row) const
inline

Returns the sibling at row for the current column.

If there is no sibling at this position, an invalid QModelIndex is returned.

See also
sibling(), siblingAtColumn()
Since
5.11

Definition at line 489 of file qabstractitemmodel.h.

References QModelIndex().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ QAbstractItemModel

friend class QAbstractItemModel
friend

Definition at line 125 of file qabstractitemmodel.h.

◆ QModelIndexList()

QModelIndexList
related

Synonym for QList<QModelIndex>.

Definition at line 225 of file qabstractitemmodel.h.


The documentation for this class was generated from the following files: