PythonQt.QtGui.QTreeView · declarations 003
Back to PythonQt.QtGui.QTreeView
setSelection
setSelection(rect: Any, command: Any) -> None
X.setSelection(rect, command)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QTreeView::setSelection(const QRect \&rect, QItemSelectionModel::SelectionFlags command)
Reimplements: QAbstractItemView::setSelection(const QRect \&rect, QItemSelectionModel::SelectionFlags flags).
Applies the selection command to the items in or touched by the rectangle, rect.
See also selectionCommand().
Upstream PySide2 reference signatures (binding differences may apply):
setSelection(self, rect: PySide2.QtCore.QRect, command: PySide2.QtCore.QItemSelectionModel.SelectionFlags) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#setSelection
setSelectionModel
setSelectionModel(selectionModel: Any) -> None
X.setSelectionModel(selectionModel)
Supplemental documentation: Qt 5 reference:
[override virtual] void QTreeView::setSelectionModel(QItemSelectionModel *selectionModel)
Reimplements: QAbstractItemView::setSelectionModel(QItemSelectionModel *selectionModel).
Upstream PySide2 reference signatures (binding differences may apply):
setSelectionModel(self, selectionModel: PySide2.QtCore.QItemSelectionModel) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#setSelectionModel
setSortingEnabled
setSortingEnabled(enable: bool) -> None
X.setSortingEnabled(enable)
Upstream PySide2 reference signatures (binding differences may apply):
setSortingEnabled(self, enable: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#setSortingEnabled
setTreePosition
setTreePosition(logicalIndex: int) -> None
X.setTreePosition(logicalIndex)
Supplemental documentation: Qt 5 reference:
void QTreeView::setTreePosition(int index)
This specifies that the tree structure should be placed at logical index index. If set to -1 then the tree will always follow visual index 0.
This function was introduced in Qt 5.2.
See also treePosition(), QHeaderView::swapSections(), and QHeaderView::moveSection().
Upstream PySide2 reference signatures (binding differences may apply):
setTreePosition(self, logicalIndex: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#setTreePosition
setUniformRowHeights
setUniformRowHeights(uniform: bool) -> None
X.setUniformRowHeights(uniform)
Upstream PySide2 reference signatures (binding differences may apply):
setUniformRowHeights(self, uniform: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#setUniformRowHeights
setWordWrap
setWordWrap(on: bool) -> None
X.setWordWrap(on)
Upstream PySide2 reference signatures (binding differences may apply):
setWordWrap(self, on: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#setWordWrap
showColumn
showColumn(column: int) -> None
X.showColumn(column)
Supplemental documentation: Qt 5 reference:
[slot] void QTreeView::showColumn(int column)
Shows the given column in the tree view.
See also hideColumn() and setColumnHidden().
Upstream PySide2 reference signatures (binding differences may apply):
showColumn(self, column: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#showColumn
sizeHintForColumn
sizeHintForColumn(column: int) -> int
X.sizeHintForColumn(column) -> int
Supplemental documentation: Qt 5 reference:
[override virtual protected] int QTreeView::sizeHintForColumn(int column) const
Reimplements: QAbstractItemView::sizeHintForColumn(int column) const.
Returns the size hint for the column's width or -1 if there is no model.
If you need to set the width of a given column to a fixed value, call QHeaderView::resizeSection() on the view's header.
If you reimplement this function in a subclass, note that the value you return is only used when resizeColumnToContents() is called. In that case, if a larger column width is required by either the view's header or the item delegate, that width will be used instead.
See also QWidget::sizeHint, header(), and QHeaderView::resizeContentsPrecision().
Upstream PySide2 reference signatures (binding differences may apply):
sizeHintForColumn(self, column: int) -> int
Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#sizeHintForColumn
sortByColumn
sortByColumn(column: int, order: Any) -> None
X.sortByColumn(column, order)
Supplemental documentation: Qt 5 reference:
[slot] void QTreeView::sortByColumn(int column, Qt::SortOrder order)
Sorts the model by the values in the given column and order.
column may be -1, in which case no sort indicator will be shown and the model will return to its natural, unsorted order. Note that not all models support this and may even crash in this case.
This function was introduced in Qt 4.2.
See also sortingEnabled.
Upstream PySide2 reference signatures (binding differences may apply):
sortByColumn(self, column: int) -> None
sortByColumn(self, column: int, order: PySide2.QtCore.Qt.SortOrder) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#sortByColumn
sortingEnabled
instance-attribute
sortingEnabled: Any
Qt 5 reference:
sortingEnabled : bool
This property holds whether sorting is enabled
If this property is true, sorting is enabled for the tree; if the property is false,
sorting is not enabled. The default value is false.
Note: In order to avoid performance issues, it is recommended that sorting is enabled after inserting the items into the tree. Alternatively, you could also insert the items into a list before inserting the items into the tree.
This property was introduced in Qt 4.2.
Access functions:
| bool | isSortingEnabled() const |
|---|---|
| void | setSortingEnabled(bool enable) |
See also sortByColumn().
Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#sortingEnabled
timerEvent
timerEvent(event: Any) -> None
X.timerEvent(event)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QTreeView::timerEvent(QTimerEvent *event)
Reimplements: QAbstractItemView::timerEvent(QTimerEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
timerEvent(self, event: PySide2.QtCore.QTimerEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#timerEvent
treePosition
treePosition() -> int
X.treePosition() -> int
Supplemental documentation: Qt 5 reference:
int QTreeView::treePosition() const
Return the logical index the tree is set on. If the return value is -1 then the tree is placed on the visual index 0.
This function was introduced in Qt 5.2.
See also setTreePosition().
Upstream PySide2 reference signatures (binding differences may apply):
treePosition(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#treePosition
uniformRowHeights
instance-attribute
uniformRowHeights: bool
Qt 5 reference:
uniformRowHeights : bool
This property holds whether all items in the treeview have the same height
This property should only be set to true if it is guaranteed that all items in the view has the same height. This enables the view to do some optimizations.
The height is obtained from the first item in the view. It is updated when the data changes on that item.
Note: If the editor size hint is bigger than the cell size hint, then the size hint of the editor will be used.
By default, this property is false.
Access functions:
| bool | uniformRowHeights() const |
|---|---|
| void | setUniformRowHeights(bool uniform) |
Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#uniformRowHeights
verticalOffset
verticalOffset() -> int
X.verticalOffset() -> int
Supplemental documentation: Qt 5 reference:
[override virtual protected] int QTreeView::verticalOffset() const
Reimplements: QAbstractItemView::verticalOffset() const.
Returns the vertical offset of the items in the tree view.
See also horizontalOffset().
Upstream PySide2 reference signatures (binding differences may apply):
verticalOffset(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#verticalOffset
viewportEntered
viewportEntered(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QTreeView.viewportEntered; argument details are not documented.
viewportEvent
viewportEvent(event: Any) -> bool
X.viewportEvent(event) -> bool
Supplemental documentation: Qt 5 reference:
[override virtual protected] bool QTreeView::viewportEvent(QEvent *event)
Reimplements: QAbstractItemView::viewportEvent(QEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
viewportEvent(self, event: PySide2.QtCore.QEvent) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#viewportEvent
viewportSizeHint
viewportSizeHint() -> Any
X.viewportSizeHint() -> PythonQt.QtCore.QSize
Supplemental documentation: Qt 5 reference:
[override virtual protected] QSize QTreeView::viewportSizeHint() const
Reimplements: QAbstractItemView::viewportSizeHint() const.
Upstream PySide2 reference signatures (binding differences may apply):
viewportSizeHint(self) -> PySide2.QtCore.QSize
Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#viewportSizeHint
visualRect
visualRect(index: Any) -> Any
X.visualRect(index) -> PythonQt.QtCore.QRect
Supplemental documentation: Qt 5 reference:
[override virtual] QRect QTreeView::visualRect(const QModelIndex \&index) const
Reimplements: QAbstractItemView::visualRect(const QModelIndex \&index) const.
Returns the rectangle on the viewport occupied by the item at index. If the index is not visible or explicitly hidden, the returned rectangle is invalid.
Upstream PySide2 reference signatures (binding differences may apply):
visualRect(self, index: PySide2.QtCore.QModelIndex) -> PySide2.QtCore.QRect
Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#visualRect
visualRegionForSelection
visualRegionForSelection(selection: Any) -> Any
X.visualRegionForSelection(selection) -> PythonQt.QtGui.QRegion
Supplemental documentation: Qt 5 reference:
[override virtual protected] QRegion QTreeView::visualRegionForSelection(const QItemSelection \&selection) const
Reimplements: QAbstractItemView::visualRegionForSelection(const QItemSelection \&selection) const.
Returns the rectangle from the viewport of the items in the given selection.
Since 4.7, the returned region only contains rectangles intersecting (or included in) the viewport.
Upstream PySide2 reference signatures (binding differences may apply):
visualRegionForSelection(self, selection: PySide2.QtCore.QItemSelection) -> PySide2.QtGui.QRegion
Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#visualRegionForSelection
windowIconChanged
windowIconChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QTreeView.windowIconChanged; argument details are not documented.
windowIconTextChanged
windowIconTextChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QTreeView.windowIconTextChanged; argument details are not documented.
windowTitleChanged
windowTitleChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QTreeView.windowTitleChanged; argument details are not documented.
wordWrap
instance-attribute
wordWrap: bool
Qt 5 reference:
wordWrap : bool
This property holds the item text word-wrapping policy
If this property is true then the item text is wrapped where necessary at word-breaks;
otherwise it is not wrapped at all. This property is false by default.
Note that even if wrapping is enabled, the cell will not be expanded to fit all text. Ellipsis will be inserted according to the current textElideMode.
This property was introduced in Qt 4.3.
Access functions:
| bool | wordWrap() const |
|---|---|
| void | setWordWrap(bool on) |
Source: https://doc.qt.io/archives/qt-5.15/qtreeview.html#wordWrap