Skip to content

PythonQt.QtGui.QAbstractItemView · declarations 004

Back to PythonQt.QtGui.QAbstractItemView

horizontalScrollBarPolicy instance-attribute

horizontalScrollBarPolicy: Any

horizontalScrollMode instance-attribute

horizontalScrollMode: Any

Qt 5 reference:

horizontalScrollMode : ScrollMode

how the view scrolls its contents in the horizontal direction

This property controls how the view scroll its contents horizontally. Scrolling can be done either per pixel or per item. Its default value comes from the style via the QStyle::SH_ItemView_ScrollMode style hint.

This property was introduced in Qt 4.2.

Access functions:

QAbstractItemView::ScrollMode horizontalScrollMode() const
void setHorizontalScrollMode(QAbstractItemView::ScrollMode mode)
void resetHorizontalScrollMode()

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#horizontalScrollMode

iconSize instance-attribute

iconSize: QSize

Qt 5 reference:

iconSize : QSize

This property holds the size of items' icons

Setting this property when the view is visible will cause the items to be laid out again.

Access functions:

QSize iconSize() const
void setIconSize(const QSize \&size)

Notifier signal:

void iconSizeChanged(const QSize \&size)

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#iconSize

iconSizeChanged

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

Native PythonQt.QtGui.QAbstractItemView.iconSizeChanged; argument details are not documented.

indexAt

indexAt(point: Any) -> Any

X.indexAt(point) -> PythonQt.QtCore.QModelIndex

Supplemental documentation: Qt 5 reference:

[pure virtual] QModelIndex QAbstractItemView::indexAt(const QPoint \&point) const

Returns the model index of the item at the viewport coordinates point.

In the base class this is a pure virtual function.

See also visualRect().

Upstream PySide2 reference signatures (binding differences may apply):

indexAt(self, point: PySide2.QtCore.QPoint) -> PySide2.QtCore.QModelIndex

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#indexAt

indexWidget

indexWidget(index: Any) -> Any

X.indexWidget(index) -> PythonQt.QtGui.QWidget

Supplemental documentation: Qt 5 reference:

QWidget *QAbstractItemView::indexWidget(const QModelIndex \&index) const

Returns the widget for the item at the given index.

This function was introduced in Qt 4.1.

See also setIndexWidget().

Upstream PySide2 reference signatures (binding differences may apply):

indexWidget(self, index: PySide2.QtCore.QModelIndex) -> PySide2.QtWidgets.QWidget

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#indexWidget

initStyleOption

initStyleOption(option: Any) -> Any

X.initStyleOption(option)

inputMethodEvent

inputMethodEvent(event: Any) -> None

X.inputMethodEvent(event)

Supplemental documentation: Qt 5 reference:

[override virtual protected] void QAbstractItemView::inputMethodEvent(QInputMethodEvent *event)

Reimplements: QWidget::inputMethodEvent(QInputMethodEvent *event).

Upstream PySide2 reference signatures (binding differences may apply):

inputMethodEvent(self, event: PySide2.QtGui.QInputMethodEvent) -> None

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#inputMethodEvent

inputMethodQuery

inputMethodQuery(query: Any) -> Any

X.inputMethodQuery(query) -> object

Supplemental documentation: Qt 5 reference:

[override virtual] QVariant QAbstractItemView::inputMethodQuery(Qt::InputMethodQuery query) const

Reimplements: QWidget::inputMethodQuery(Qt::InputMethodQuery query) const.

Upstream PySide2 reference signatures (binding differences may apply):

inputMethodQuery(self, query: PySide2.QtCore.Qt.InputMethodQuery) -> typing.Any

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#inputMethodQuery

isIndexHidden

isIndexHidden(index: Any) -> bool

X.isIndexHidden(index) -> bool

Supplemental documentation: Qt 5 reference:

[pure virtual protected] bool QAbstractItemView::isIndexHidden(const QModelIndex \&index) const

Returns true if the item referred to by the given index is hidden in the view, otherwise returns false.

Hiding is a view specific feature. For example in TableView a column can be marked as hidden or a row in the TreeView.

In the base class this is a pure virtual function.

Upstream PySide2 reference signatures (binding differences may apply):

isIndexHidden(self, index: PySide2.QtCore.QModelIndex) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#isIndexHidden

itemDelegate

itemDelegate(index: Any) -> Any

X.itemDelegate(index) -> PythonQt.QtGui.QAbstractItemDelegate

Supplemental documentation: Qt 5 reference:

QAbstractItemDelegate *QAbstractItemView::itemDelegate() const

Returns the item delegate used by this view and model. This is either one set with setItemDelegate(), or the default one.

See also setItemDelegate().

QAbstractItemDelegate *QAbstractItemView::itemDelegate(const QModelIndex \&index) const

Returns the item delegate used by this view and model for the given index.

Upstream PySide2 reference signatures (binding differences may apply):

itemDelegate(self) -> PySide2.QtWidgets.QAbstractItemDelegate
itemDelegate(self, index: PySide2.QtCore.QModelIndex) -> PySide2.QtWidgets.QAbstractItemDelegate

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#itemDelegate

itemDelegateForColumn

itemDelegateForColumn(column: int) -> Any

X.itemDelegateForColumn(column) -> PythonQt.QtGui.QAbstractItemDelegate

Supplemental documentation: Qt 5 reference:

QAbstractItemDelegate *QAbstractItemView::itemDelegateForColumn(int column) const

Returns the item delegate used by this view and model for the given column. You can call itemDelegate() to get a pointer to the current delegate for a given index.

This function was introduced in Qt 4.2.

See also setItemDelegateForColumn(), itemDelegateForRow(), and itemDelegate().

Upstream PySide2 reference signatures (binding differences may apply):

itemDelegateForColumn(self, column: int) -> PySide2.QtWidgets.QAbstractItemDelegate

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#itemDelegateForColumn

itemDelegateForRow

itemDelegateForRow(row: int) -> Any

X.itemDelegateForRow(row) -> PythonQt.QtGui.QAbstractItemDelegate

Supplemental documentation: Qt 5 reference:

QAbstractItemDelegate *QAbstractItemView::itemDelegateForRow(int row) const

Returns the item delegate used by this view and model for the given row, or nullptr if no delegate has been assigned. You can call itemDelegate() to get a pointer to the current delegate for a given index.

This function was introduced in Qt 4.2.

See also setItemDelegateForRow(), itemDelegateForColumn(), and setItemDelegate().

Upstream PySide2 reference signatures (binding differences may apply):

itemDelegateForRow(self, row: int) -> PySide2.QtWidgets.QAbstractItemDelegate

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#itemDelegateForRow

keyPressEvent

keyPressEvent(event: Any) -> None

X.keyPressEvent(event)

Supplemental documentation: Qt 5 reference:

[override virtual protected] void QAbstractItemView::keyPressEvent(QKeyEvent *event)

Reimplements: QAbstractScrollArea::keyPressEvent(QKeyEvent *e).

This function is called with the given event when a key event is sent to the widget. The default implementation handles basic cursor movement, e.g. Up, Down, Left, Right, Home, PageUp, and PageDown; the activated() signal is emitted if the current index is valid and the activation key is pressed (e.g. Enter or Return, depending on the platform). This function is where editing is initiated by key press, e.g. if F2 is pressed.

See also edit(), moveCursor(), keyboardSearch(), and tabKeyNavigation.

Upstream PySide2 reference signatures (binding differences may apply):

keyPressEvent(self, event: PySide2.QtGui.QKeyEvent) -> None

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#keyPressEvent

keyboardSearch

keyboardSearch(search: str) -> None

X.keyboardSearch(search)

Supplemental documentation: Qt 5 reference:

Moves to and selects the item best matching the string search. If no item is found nothing happens.

In the default implementation, the search is reset if search is empty, or the time interval since the last search has exceeded QApplication::keyboardInputInterval().

Upstream PySide2 reference signatures (binding differences may apply):

keyboardSearch(self, search: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#keyboardSearch

lineWidth instance-attribute

lineWidth: Any

maximumViewportSize

maximumViewportSize() -> Any

X.maximumViewportSize() -> PythonQt.QtCore.QSize

midLineWidth instance-attribute

midLineWidth: Any

model

model() -> Any

X.model() -> PythonQt.QtCore.QAbstractItemModel

Supplemental documentation: Qt 5 reference:

QAbstractItemModel *QAbstractItemView::model() const

Returns the model that this view is presenting.

See also setModel().

Upstream PySide2 reference signatures (binding differences may apply):

model(self) -> PySide2.QtCore.QAbstractItemModel

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#model

mouseDoubleClickEvent

mouseDoubleClickEvent(event: Any) -> None

X.mouseDoubleClickEvent(event)

Supplemental documentation: Qt 5 reference:

[override virtual protected] void QAbstractItemView::mouseDoubleClickEvent(QMouseEvent *event)

Reimplements: QAbstractScrollArea::mouseDoubleClickEvent(QMouseEvent *e).

This function is called with the given event when a mouse button is double clicked inside the widget. If the double-click is on a valid item it emits the doubleClicked() signal and calls edit() on the item.

Upstream PySide2 reference signatures (binding differences may apply):

mouseDoubleClickEvent(self, event: PySide2.QtGui.QMouseEvent) -> None

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#mouseDoubleClickEvent

mouseMoveEvent

mouseMoveEvent(event: Any) -> None

X.mouseMoveEvent(event)

Supplemental documentation: Qt 5 reference:

[override virtual protected] void QAbstractItemView::mouseMoveEvent(QMouseEvent *event)

Reimplements: QAbstractScrollArea::mouseMoveEvent(QMouseEvent *e).

This function is called with the given event when a mouse move event is sent to the widget. If a selection is in progress and new items are moved over the selection is extended; if a drag is in progress it is continued.

Upstream PySide2 reference signatures (binding differences may apply):

mouseMoveEvent(self, event: PySide2.QtGui.QMouseEvent) -> None

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#mouseMoveEvent

mousePressEvent

mousePressEvent(event: Any) -> None

X.mousePressEvent(event)

Supplemental documentation: Qt 5 reference:

[override virtual protected] void QAbstractItemView::mousePressEvent(QMouseEvent *event)

Reimplements: QAbstractScrollArea::mousePressEvent(QMouseEvent *e).

This function is called with the given event when a mouse button is pressed while the cursor is inside the widget. If a valid item is pressed on it is made into the current item. This function emits the pressed() signal.

Upstream PySide2 reference signatures (binding differences may apply):

mousePressEvent(self, event: PySide2.QtGui.QMouseEvent) -> None

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#mousePressEvent

mouseReleaseEvent

mouseReleaseEvent(event: Any) -> None

X.mouseReleaseEvent(event)

Supplemental documentation: Qt 5 reference:

[override virtual protected] void QAbstractItemView::mouseReleaseEvent(QMouseEvent *event)

Reimplements: QAbstractScrollArea::mouseReleaseEvent(QMouseEvent *e).

This function is called with the given event when a mouse button is released, after a mouse press event on the widget. If a user presses the mouse inside your widget and then drags the mouse to another location before releasing the mouse button, your widget receives the release event. The function will emit the clicked() signal if an item was being pressed.

Upstream PySide2 reference signatures (binding differences may apply):

mouseReleaseEvent(self, event: PySide2.QtGui.QMouseEvent) -> None

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#mouseReleaseEvent

moveCursor

moveCursor(cursorAction: Any, modifiers: Any) -> Any

X.moveCursor(cursorAction, modifiers) -> PythonQt.QtCore.QModelIndex

Supplemental documentation: Qt 5 reference:

[pure virtual protected] QModelIndex QAbstractItemView::moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers)

Returns a QModelIndex object pointing to the next object in the view, based on the given cursorAction and keyboard modifiers specified by modifiers.

In the base class this is a pure virtual function.

Upstream PySide2 reference signatures (binding differences may apply):

moveCursor(self, cursorAction: PySide2.QtWidgets.QAbstractItemView.CursorAction, modifiers: PySide2.QtCore.Qt.KeyboardModifiers) -> PySide2.QtCore.QModelIndex

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#moveCursor

objectNameChanged

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

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

openPersistentEditor

openPersistentEditor(index: Any) -> None

X.openPersistentEditor(index)

Supplemental documentation: Qt 5 reference:

void QAbstractItemView::openPersistentEditor(const QModelIndex \&index)

Opens a persistent editor on the item at the given index. If no editor exists, the delegate will create a new editor.

See also closePersistentEditor() and isPersistentEditorOpen().

Upstream PySide2 reference signatures (binding differences may apply):

openPersistentEditor(self, index: PySide2.QtCore.QModelIndex) -> None

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#openPersistentEditor

paintEvent

paintEvent(arg__1: Any) -> Any

X.paintEvent(arg__1)

pressed

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

Native PythonQt.QtGui.QAbstractItemView.pressed; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QAbstractItemView::pressed(const QModelIndex \&index)

This signal is emitted when a mouse button is pressed. The item the mouse was pressed on is specified by index. The signal is only emitted when the index is valid.

Use the QGuiApplication::mouseButtons() function to get the state of the mouse buttons.

See also activated(), clicked(), doubleClicked(), and entered().

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#pressed

reset

reset() -> None

X.reset()

Supplemental documentation: Qt 5 reference:

[virtual slot] void QAbstractItemView::reset()

Reset the internal state of the view.

Warning: This function will reset open editors, scroll bar positions, selections, etc. Existing changes will not be committed. If you would like to save your changes when resetting the view, you can reimplement this function, commit your changes, and then call the superclass' implementation.

Upstream PySide2 reference signatures (binding differences may apply):

reset(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#reset

resizeEvent

resizeEvent(event: Any) -> None

X.resizeEvent(event)

Supplemental documentation: Qt 5 reference:

[override virtual protected] void QAbstractItemView::resizeEvent(QResizeEvent *event)

Reimplements: QAbstractScrollArea::resizeEvent(QResizeEvent *event).

This function is called with the given event when a resize event is sent to the widget.

See also QWidget::resizeEvent().

Upstream PySide2 reference signatures (binding differences may apply):

resizeEvent(self, event: PySide2.QtGui.QResizeEvent) -> None

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#resizeEvent

rootIndex

rootIndex() -> Any

X.rootIndex() -> PythonQt.QtCore.QModelIndex

Supplemental documentation: Qt 5 reference:

QModelIndex QAbstractItemView::rootIndex() const

Returns the model index of the model's root item. The root item is the parent item to the view's toplevel items. The root can be invalid.

See also setRootIndex().

Upstream PySide2 reference signatures (binding differences may apply):

rootIndex(self) -> PySide2.QtCore.QModelIndex

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#rootIndex

scheduleDelayedItemsLayout

scheduleDelayedItemsLayout() -> None

X.scheduleDelayedItemsLayout()

Supplemental documentation: Qt 5 reference:

[protected] void QAbstractItemView::scheduleDelayedItemsLayout()

Schedules a layout of the items in the view to be executed when the event processing starts.

Even if scheduleDelayedItemsLayout() is called multiple times before events are processed, the view will only do the layout once.

See also executeDelayedItemsLayout().

Upstream PySide2 reference signatures (binding differences may apply):

scheduleDelayedItemsLayout(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#scheduleDelayedItemsLayout

scrollBarWidgets

scrollBarWidgets(alignment: Any) -> tuple

X.scrollBarWidgets(alignment) -> tuple

scrollContentsBy

scrollContentsBy(dx: Any, dy: Any) -> Any

X.scrollContentsBy(dx, dy)

scrollDirtyRegion

scrollDirtyRegion(dx: int, dy: int) -> None

X.scrollDirtyRegion(dx, dy)

Supplemental documentation: Qt 5 reference:

[protected] void QAbstractItemView::scrollDirtyRegion(int dx, int dy)

Prepares the view for scrolling by (dx,dy) pixels by moving the dirty regions in the opposite direction. You only need to call this function if you are implementing a scrolling viewport in your view subclass.

If you implement scrollContentsBy() in a subclass of QAbstractItemView, call this function before you call QWidget::scroll() on the viewport. Alternatively, just call update().

See also scrollContentsBy(), dirtyRegionOffset(), and setDirtyRegion().

Upstream PySide2 reference signatures (binding differences may apply):

scrollDirtyRegion(self, dx: int, dy: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#scrollDirtyRegion

scrollTo

scrollTo(index: Any, hint: Any) -> None

X.scrollTo(index, hint)

Supplemental documentation: Qt 5 reference:

[pure virtual] void QAbstractItemView::scrollTo(const QModelIndex \&index, QAbstractItemView::ScrollHint hint \= EnsureVisible)

Scrolls the view if necessary to ensure that the item at index is visible. The view will try to position the item according to the given hint.

In the base class this is a pure virtual function.

Upstream PySide2 reference signatures (binding differences may apply):

scrollTo(self, index: PySide2.QtCore.QModelIndex, hint: PySide2.QtWidgets.QAbstractItemView.ScrollHint=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#scrollTo

scrollToBottom

scrollToBottom() -> None

X.scrollToBottom()

Supplemental documentation: Qt 5 reference:

[slot] void QAbstractItemView::scrollToBottom()

Scrolls the view to the bottom.

This function was introduced in Qt 4.1.

See also scrollTo() and scrollToTop().

Upstream PySide2 reference signatures (binding differences may apply):

scrollToBottom(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#scrollToBottom

scrollToTop

scrollToTop() -> None

X.scrollToTop()

Supplemental documentation: Qt 5 reference:

[slot] void QAbstractItemView::scrollToTop()

Scrolls the view to the top.

This function was introduced in Qt 4.1.

See also scrollTo() and scrollToBottom().

Upstream PySide2 reference signatures (binding differences may apply):

scrollToTop(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#scrollToTop

selectAll

selectAll() -> None

X.selectAll()

Supplemental documentation: Qt 5 reference:

[virtual slot] void QAbstractItemView::selectAll()

Selects all items in the view. This function will use the selection behavior set on the view when selecting.

See also setSelection(), selectedIndexes(), and clearSelection().

Upstream PySide2 reference signatures (binding differences may apply):

selectAll(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#selectAll

selectedIndexes

selectedIndexes() -> tuple

X.selectedIndexes() -> tuple

Supplemental documentation: Qt 5 reference:

[virtual protected] QModelIndexList QAbstractItemView::selectedIndexes() const

This convenience function returns a list of all selected and non-hidden item indexes in the view. The list contains no duplicates, and is not sorted.

See also QItemSelectionModel::selectedIndexes().

Upstream PySide2 reference signatures (binding differences may apply):

selectedIndexes(self) -> typing.List[int]

Source: https://doc.qt.io/archives/qt-5.15/qabstractitemview.html#selectedIndexes