Skip to content

PythonQt.QtGui.QTreeView · declarations 001

Back to PythonQt.QtGui.QTreeView

activated

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

Native PythonQt.QtGui.QTreeView.activated; argument details are not documented.

allColumnsShowFocus instance-attribute

allColumnsShowFocus: bool

Qt 5 reference:

allColumnsShowFocus : bool

This property holds whether items should show keyboard focus using all columns

If this property is true all columns will show focus, otherwise only one column will show focus.

The default is false.

This property was introduced in Qt 4.2.

Access functions:

bool allColumnsShowFocus() const
void setAllColumnsShowFocus(bool enable)

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#allColumnsShowFocus

animated instance-attribute

animated: Any

Qt 5 reference:

animated : bool

This property holds whether animations are enabled

If this property is true the treeview will animate expansion and collapsing of branches. If this property is false, the treeview will expand or collapse branches immediately without showing the animation.

By default, this property is false.

This property was introduced in Qt 4.2.

Access functions:

bool isAnimated() const
void setAnimated(bool enable)

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#animated

autoExpandDelay instance-attribute

autoExpandDelay: int

Qt 5 reference:

autoExpandDelay : int

This property holds the delay time before items in a tree are opened during a drag and drop operation.

This property holds the amount of time in milliseconds that the user must wait over a node before that node will automatically open or close. If the time is set to less then 0 then it will not be activated.

By default, this property has a value of -1, meaning that auto-expansion is disabled.

This property was introduced in Qt 4.3.

Access functions:

int autoExpandDelay() const
void setAutoExpandDelay(int delay)

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#autoExpandDelay

clicked

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

Native PythonQt.QtGui.QTreeView.clicked; argument details are not documented.

collapse

collapse(index: Any) -> None

X.collapse(index)

Supplemental documentation: Qt 5 reference:

[slot] void QTreeView::collapse(const QModelIndex \&index)

Collapses the model item specified by the index.

See also collapsed().

Upstream PySide2 reference signatures (binding differences may apply):

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

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#collapse

collapseAll

collapseAll() -> None

X.collapseAll()

Supplemental documentation: Qt 5 reference:

[slot] void QTreeView::collapseAll()

Collapses all expanded items.

This function was introduced in Qt 4.2.

See also expandAll(), expand(), collapse(), and setExpanded().

Upstream PySide2 reference signatures (binding differences may apply):

collapseAll(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#collapseAll

collapsed

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

Native PythonQt.QtGui.QTreeView.collapsed; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QTreeView::collapsed(const QModelIndex \&index)

This signal is emitted when the item specified by index is collapsed.

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#collapsed

columnAt

columnAt(x: int) -> int

X.columnAt(x) -> int

Supplemental documentation: Qt 5 reference:

int QTreeView::columnAt(int x) const

Returns the column in the tree view whose header covers the x coordinate given.

Upstream PySide2 reference signatures (binding differences may apply):

columnAt(self, x: int) -> int

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#columnAt

columnViewportPosition

columnViewportPosition(column: int) -> int

X.columnViewportPosition(column) -> int

Supplemental documentation: Qt 5 reference:

int QTreeView::columnViewportPosition(int column) const

Returns the horizontal position of the column in the viewport.

Upstream PySide2 reference signatures (binding differences may apply):

columnViewportPosition(self, column: int) -> int

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#columnViewportPosition

columnWidth

columnWidth(column: int) -> int

X.columnWidth(column) -> int

Supplemental documentation: Qt 5 reference:

int QTreeView::columnWidth(int column) const

Returns the width of the column.

See also resizeColumnToContents() and setColumnWidth().

Upstream PySide2 reference signatures (binding differences may apply):

columnWidth(self, column: int) -> int

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#columnWidth

customContextMenuRequested

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

Native PythonQt.QtGui.QTreeView.customContextMenuRequested; argument details are not documented.

destroyed

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

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

doItemsLayout

doItemsLayout() -> None

X.doItemsLayout()

Upstream PySide2 reference signatures (binding differences may apply):

doItemsLayout(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#doItemsLayout

doubleClicked

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

Native PythonQt.QtGui.QTreeView.doubleClicked; argument details are not documented.

dragMoveEvent

dragMoveEvent(event: Any) -> None

X.dragMoveEvent(event)

Supplemental documentation: Qt 5 reference:

[override virtual protected] void QTreeView::dragMoveEvent(QDragMoveEvent *event)

Reimplements: QAbstractItemView::dragMoveEvent(QDragMoveEvent *event).

Upstream PySide2 reference signatures (binding differences may apply):

dragMoveEvent(self, event: PySide2.QtGui.QDragMoveEvent) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#dragMoveEvent

drawBranches

drawBranches(painter: Any, rect: Any, index: Any) -> None

X.drawBranches(painter, rect, index)

Supplemental documentation: Qt 5 reference:

[virtual protected] void QTreeView::drawBranches(QPainter *painter, const QRect \&rect, const QModelIndex \&index) const

Draws the branches in the tree view on the same row as the model item index, using the painter given. The branches are drawn in the rectangle specified by rect.

Upstream PySide2 reference signatures (binding differences may apply):

drawBranches(self, painter: PySide2.QtGui.QPainter, rect: PySide2.QtCore.QRect, index: PySide2.QtCore.QModelIndex) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#drawBranches

drawRow

drawRow(painter: Any, options: Any, index: Any) -> None

X.drawRow(painter, options, index)

Supplemental documentation: Qt 5 reference:

[virtual protected] void QTreeView::drawRow(QPainter *painter, const QStyleOptionViewItem \&option, const QModelIndex \&index) const

Draws the row in the tree view that contains the model item index, using the painter given. The option controls how the item is displayed.

See also setAlternatingRowColors().

Upstream PySide2 reference signatures (binding differences may apply):

drawRow(self, painter: PySide2.QtGui.QPainter, options: PySide2.QtWidgets.QStyleOptionViewItem, index: PySide2.QtCore.QModelIndex) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#drawRow

drawTree

drawTree(painter: Any, region: Any) -> None

X.drawTree(painter, region)

Supplemental documentation: Qt 5 reference:

[protected] void QTreeView::drawTree(QPainter *painter, const QRegion \&region) const

Draws the part of the tree intersecting the given region using the specified painter.

This function was introduced in Qt 4.2.

See also paintEvent().

Upstream PySide2 reference signatures (binding differences may apply):

drawTree(self, painter: PySide2.QtGui.QPainter, region: PySide2.QtGui.QRegion) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#drawTree

entered

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

Native PythonQt.QtGui.QTreeView.entered; argument details are not documented.

expand

expand(index: Any) -> None

X.expand(index)

Supplemental documentation: Qt 5 reference:

[slot] void QTreeView::expand(const QModelIndex \&index)

Expands the model item specified by the index.

See also expanded().

Upstream PySide2 reference signatures (binding differences may apply):

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

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#expand

expandAll

expandAll() -> None

X.expandAll()

Supplemental documentation: Qt 5 reference:

[slot] void QTreeView::expandAll()

Expands all expandable items.

Note: This function will not try to fetch more data.

Warning: If the model contains a large number of items, this function will take some time to execute.

This function was introduced in Qt 4.2.

See also collapseAll(), expand(), collapse(), and setExpanded().

Upstream PySide2 reference signatures (binding differences may apply):

expandAll(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#expandAll

expandRecursively

expandRecursively(index: Any, depth: int) -> None

X.expandRecursively(index, depth)

Supplemental documentation: Qt 5 reference:

[slot] void QTreeView::expandRecursively(const QModelIndex \&index, int depth \= -1)

Expands the item at the given index and all its children to the given depth. The depth is relative to the given index. A depth of -1 will expand all children, a depth of 0 will only expand the given index.

Note: This function will not try to fetch more data.

Warning: If the model contains a large number of items, this function will take some time to execute.

This function was introduced in Qt 5.13.

See also expandAll().

Upstream PySide2 reference signatures (binding differences may apply):

expandRecursively(self, index: PySide2.QtCore.QModelIndex, depth: int=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#expandRecursively

expandToDepth

expandToDepth(depth: int) -> None

X.expandToDepth(depth)

Supplemental documentation: Qt 5 reference:

[slot] void QTreeView::expandToDepth(int depth)

Expands all expandable items to the given depth.

Note: This function will not try to fetch more data.

This function was introduced in Qt 4.3.

See also expandAll(), collapseAll(), expand(), collapse(), and setExpanded().

Upstream PySide2 reference signatures (binding differences may apply):

expandToDepth(self, depth: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#expandToDepth

expanded

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

Native PythonQt.QtGui.QTreeView.expanded; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QTreeView::expanded(const QModelIndex \&index)

This signal is emitted when the item specified by index is expanded.

See also setExpanded().

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#expanded

expandsOnDoubleClick instance-attribute

expandsOnDoubleClick: bool

Qt 5 reference:

expandsOnDoubleClick : bool

This property holds whether the items can be expanded by double-clicking.

This property holds whether the user can expand and collapse items by double-clicking. The default value is true.

This property was introduced in Qt 4.4.

Access functions:

bool expandsOnDoubleClick() const
void setExpandsOnDoubleClick(bool enable)

See also itemsExpandable.

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#expandsOnDoubleClick

header

header() -> Any

X.header() -> PythonQt.QtGui.QHeaderView

Supplemental documentation: Qt 5 reference:

QHeaderView *QTreeView::header() const

Returns the header for the tree view.

See also setHeader() and QAbstractItemModel::headerData().

Upstream PySide2 reference signatures (binding differences may apply):

header(self) -> PySide2.QtWidgets.QHeaderView

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#header

headerHidden instance-attribute

headerHidden: Any

Qt 5 reference:

headerHidden : bool

This property holds whether the header is shown or not.

If this property is true, the header is not shown otherwise it is. The default value is false.

This property was introduced in Qt 4.4.

Access functions:

bool isHeaderHidden() const
void setHeaderHidden(bool hide)

See also header().

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#headerHidden

hideColumn

hideColumn(column: int) -> None

X.hideColumn(column)

Supplemental documentation: Qt 5 reference:

[slot] void QTreeView::hideColumn(int column)

Hides the column given.

Note: This function should only be called after the model has been initialized, as the view needs to know the number of columns in order to hide column.

See also showColumn() and setColumnHidden().

Upstream PySide2 reference signatures (binding differences may apply):

hideColumn(self, column: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#hideColumn

horizontalOffset

horizontalOffset() -> int

X.horizontalOffset() -> int

Supplemental documentation: Qt 5 reference:

[override virtual protected] int QTreeView::horizontalOffset() const

Reimplements: QAbstractItemView::horizontalOffset() const.

Returns the horizontal offset of the items in the treeview.

Note that the tree view uses the horizontal header section positions to determine the positions of columns in the view.

See also verticalOffset().

Upstream PySide2 reference signatures (binding differences may apply):

horizontalOffset(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#horizontalOffset

iconSizeChanged

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

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

indentation instance-attribute

indentation: int

Qt 5 reference:

indentation : int

indentation of the items in the tree view.

This property holds the indentation measured in pixels of the items for each level in the tree view. For top-level items, the indentation specifies the horizontal distance from the viewport edge to the items in the first column; for child items, it specifies their indentation from their parent items.

By default, the value of this property is style dependent. Thus, when the style changes, this property updates from it. Calling setIndentation() stops the updates, calling resetIndentation() will restore default behavior.

Access functions:

int indentation() const
void setIndentation(int i)
void resetIndentation()

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#indentation

indexAbove

indexAbove(index: Any) -> Any

X.indexAbove(index) -> PythonQt.QtCore.QModelIndex

Supplemental documentation: Qt 5 reference:

QModelIndex QTreeView::indexAbove(const QModelIndex \&index) const

Returns the model index of the item above index.

Upstream PySide2 reference signatures (binding differences may apply):

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

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#indexAbove

indexAt

indexAt(p: Any) -> Any

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

Supplemental documentation: Qt 5 reference:

[override virtual] QModelIndex QTreeView::indexAt(const QPoint \&point) const

Reimplements: QAbstractItemView::indexAt(const QPoint \&point) const.

Upstream PySide2 reference signatures (binding differences may apply):

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

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

indexBelow

indexBelow(index: Any) -> Any

X.indexBelow(index) -> PythonQt.QtCore.QModelIndex

Supplemental documentation: Qt 5 reference:

QModelIndex QTreeView::indexBelow(const QModelIndex \&index) const

Returns the model index of the item below index.

Upstream PySide2 reference signatures (binding differences may apply):

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

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#indexBelow

indexRowSizeHint

indexRowSizeHint(index: Any) -> int

X.indexRowSizeHint(index) -> int

Supplemental documentation: Qt 5 reference:

[protected] int QTreeView::indexRowSizeHint(const QModelIndex \&index) const

Returns the size hint for the row indicated by index.

See also sizeHintForColumn() and uniformRowHeights().

Upstream PySide2 reference signatures (binding differences may apply):

indexRowSizeHint(self, index: PySide2.QtCore.QModelIndex) -> int

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#indexRowSizeHint

isAnimated

isAnimated() -> bool

X.isAnimated() -> bool

Upstream PySide2 reference signatures (binding differences may apply):

isAnimated(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#isAnimated

isColumnHidden

isColumnHidden(column: int) -> bool

X.isColumnHidden(column) -> bool

Supplemental documentation: Qt 5 reference:

bool QTreeView::isColumnHidden(int column) const

Returns true if the column is hidden; otherwise returns false.

See also hideColumn() and isRowHidden().

Upstream PySide2 reference signatures (binding differences may apply):

isColumnHidden(self, column: int) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#isColumnHidden

isExpanded

isExpanded(index: Any) -> bool

X.isExpanded(index) -> bool

Supplemental documentation: Qt 5 reference:

bool QTreeView::isExpanded(const QModelIndex \&index) const

Returns true if the model item index is expanded; otherwise returns false.

See also expand(), expanded(), and setExpanded().

Upstream PySide2 reference signatures (binding differences may apply):

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

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#isExpanded

isFirstColumnSpanned

isFirstColumnSpanned(row: int, parent: Any) -> bool

X.isFirstColumnSpanned(row, parent) -> bool

Supplemental documentation: Qt 5 reference:

bool QTreeView::isFirstColumnSpanned(int row, const QModelIndex \&parent) const

Returns true if the item in first column in the given row of the parent is spanning all the columns; otherwise returns false.

This function was introduced in Qt 4.3.

See also setFirstColumnSpanned().

Upstream PySide2 reference signatures (binding differences may apply):

isFirstColumnSpanned(self, row: int, parent: PySide2.QtCore.QModelIndex) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#isFirstColumnSpanned