Skip to content

PythonQt.QtGui.QHeaderView · declarations 003

Back to PythonQt.QtGui.QHeaderView

setMaximumSectionSize

setMaximumSectionSize(size: int) -> None

X.setMaximumSectionSize(size)

Upstream PySide2 reference signatures (binding differences may apply):

setMaximumSectionSize(self, size: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#setMaximumSectionSize

setMinimumSectionSize

setMinimumSectionSize(size: int) -> None

X.setMinimumSectionSize(size)

Upstream PySide2 reference signatures (binding differences may apply):

setMinimumSectionSize(self, size: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#setMinimumSectionSize

setModel

setModel(model: Any) -> None

X.setModel(model)

Supplemental documentation: Qt 5 reference:

[override virtual] void QHeaderView::setModel(QAbstractItemModel *model)

Reimplements: QAbstractItemView::setModel(QAbstractItemModel *model).

Upstream PySide2 reference signatures (binding differences may apply):

setModel(self, model: PySide2.QtCore.QAbstractItemModel) -> None

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#setModel

setOffset

setOffset(offset: int) -> None

X.setOffset(offset)

Supplemental documentation: Qt 5 reference:

[slot] void QHeaderView::setOffset(int offset)

Sets the header's offset to offset.

See also offset() and length().

Upstream PySide2 reference signatures (binding differences may apply):

setOffset(self, offset: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#setOffset

setOffsetToLastSection

setOffsetToLastSection() -> None

X.setOffsetToLastSection()

Supplemental documentation: Qt 5 reference:

[slot] void QHeaderView::setOffsetToLastSection()

Sets the offset to make the last section visible.

This function was introduced in Qt 4.2.

See also setOffset(), sectionPosition(), and setOffsetToSectionPosition().

Upstream PySide2 reference signatures (binding differences may apply):

setOffsetToLastSection(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#setOffsetToLastSection

setOffsetToSectionPosition

setOffsetToSectionPosition(visualIndex: int) -> None

X.setOffsetToSectionPosition(visualIndex)

Supplemental documentation: Qt 5 reference:

[slot] void QHeaderView::setOffsetToSectionPosition(int visualSectionNumber)

Sets the offset to the start of the section at the given visualSectionNumber. visualSectionNumber is the actual visible section when hiddenSections are not considered. That is not always the same as visualIndex().

This function was introduced in Qt 4.2.

See also setOffset() and sectionPosition().

Upstream PySide2 reference signatures (binding differences may apply):

setOffsetToSectionPosition(self, visualIndex: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#setOffsetToSectionPosition

setResizeContentsPrecision

setResizeContentsPrecision(precision: int) -> None

X.setResizeContentsPrecision(precision)

Supplemental documentation: Qt 5 reference:

void QHeaderView::setResizeContentsPrecision(int precision)

Sets how precise QHeaderView should calculate the size when ResizeToContents is used. A low value will provide a less accurate but fast auto resize while a higher value will provide a more accurate resize that however can be slow.

The number precision specifies how many sections that should be consider when calculating the preferred size.

The default value is 1000 meaning that a horizontal column with auto-resize will look at maximum 1000 rows on calculating when doing an auto resize.

Special value 0 means that it will look at only the visible area. Special value -1 will imply looking at all elements.

This value is used in QTableView::sizeHintForColumn(), QTableView::sizeHintForRow() and QTreeView::sizeHintForColumn(). Reimplementing these functions can make this function not having an effect.

This function was introduced in Qt 5.2.

See also resizeContentsPrecision(), setSectionResizeMode(), resizeSections(), QTableView::sizeHintForColumn(), QTableView::sizeHintForRow(), and QTreeView::sizeHintForColumn().

Upstream PySide2 reference signatures (binding differences may apply):

setResizeContentsPrecision(self, precision: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#setResizeContentsPrecision

setRootIndex

setRootIndex(index: Any) -> Any

X.setRootIndex(index)

setSectionHidden

setSectionHidden(logicalIndex: int, hide: bool) -> None

X.setSectionHidden(logicalIndex, hide)

Supplemental documentation: Qt 5 reference:

void QHeaderView::setSectionHidden(int logicalIndex, bool hide)

If hide is true the section specified by logicalIndex is hidden; otherwise the section is shown.

See also isSectionHidden() and hiddenSectionCount().

Upstream PySide2 reference signatures (binding differences may apply):

setSectionHidden(self, logicalIndex: int, hide: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#setSectionHidden

setSectionResizeMode

setSectionResizeMode(logicalIndex: Any, mode: Any) -> None

X.setSectionResizeMode(logicalIndex, mode)

Supplemental documentation: Qt 5 reference:

void QHeaderView::setSectionResizeMode(QHeaderView::ResizeMode mode)

Sets the constraints on how the header can be resized to those described by the given mode.

This function was introduced in Qt 5.0.

See also sectionResizeMode(), length(), and sectionResized().

void QHeaderView::setSectionResizeMode(int logicalIndex, QHeaderView::ResizeMode mode)

Sets the constraints on how the section specified by logicalIndex in the header can be resized to those described by the given mode. The logical index should exist at the time this function is called.

Note: This setting will be ignored for the last section if the stretchLastSection property is set to true. This is the default for the horizontal headers provided by QTreeView.

This function was introduced in Qt 5.0.

See also setStretchLastSection() and resizeContentsPrecision().

Upstream PySide2 reference signatures (binding differences may apply):

setSectionResizeMode(self, logicalIndex: int, mode: PySide2.QtWidgets.QHeaderView.ResizeMode) -> None
setSectionResizeMode(self, mode: PySide2.QtWidgets.QHeaderView.ResizeMode) -> None

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#setSectionResizeMode

setSectionsClickable

setSectionsClickable(clickable: bool) -> None

X.setSectionsClickable(clickable)

Supplemental documentation: Qt 5 reference:

void QHeaderView::setSectionsClickable(bool clickable)

If clickable is true, the header will respond to single clicks.

This function was introduced in Qt 5.0.

See also sectionsClickable(), sectionClicked(), sectionPressed(), and setSortIndicatorShown().

Upstream PySide2 reference signatures (binding differences may apply):

setSectionsClickable(self, clickable: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#setSectionsClickable

setSectionsMovable

setSectionsMovable(movable: bool) -> None

X.setSectionsMovable(movable)

Supplemental documentation: Qt 5 reference:

void QHeaderView::setSectionsMovable(bool movable)

If movable is true, the header sections may be moved by the user; otherwise they are fixed in place.

When used in combination with QTreeView, the first column is not movable (since it contains the tree structure), by default. You can make it movable with setFirstSectionMovable(true).

This function was introduced in Qt 5.0.

See also sectionsMovable(), sectionMoved(), and setFirstSectionMovable().

Upstream PySide2 reference signatures (binding differences may apply):

setSectionsMovable(self, movable: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#setSectionsMovable

setSelection

setSelection(rect: Any, arg1: flags) -> None

X.setSelection(rect, flags)

Supplemental documentation: Qt 5 reference:

[override virtual protected] void QHeaderView::setSelection(const QRect \&rect, QItemSelectionModel::SelectionFlags flags)

Reimplements: QAbstractItemView::setSelection(const QRect \&rect, QItemSelectionModel::SelectionFlags flags).

Selects the items in the given rect according to the specified flags.

The base class implementation does nothing.

Upstream PySide2 reference signatures (binding differences may apply):

setSelection(self, rect: PySide2.QtCore.QRect, flags: PySide2.QtCore.QItemSelectionModel.SelectionFlags) -> None

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#setSelection

setSelectionModel

setSelectionModel(selectionModel: Any) -> Any

X.setSelectionModel(selectionModel)

setSortIndicator

setSortIndicator(logicalIndex: int, order: Any) -> None

X.setSortIndicator(logicalIndex, order)

Supplemental documentation: Qt 5 reference:

void QHeaderView::setSortIndicator(int logicalIndex, Qt::SortOrder order)

Sets the sort indicator for the section specified by the given logicalIndex in the direction specified by order, and removes the sort indicator from any other section that was showing it.

logicalIndex 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.

See also sortIndicatorSection() and sortIndicatorOrder().

Upstream PySide2 reference signatures (binding differences may apply):

setSortIndicator(self, logicalIndex: int, order: PySide2.QtCore.Qt.SortOrder) -> None

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#setSortIndicator

setSortIndicatorShown

setSortIndicatorShown(show: bool) -> None

X.setSortIndicatorShown(show)

Upstream PySide2 reference signatures (binding differences may apply):

setSortIndicatorShown(self, show: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#setSortIndicatorShown

setStretchLastSection

setStretchLastSection(stretch: bool) -> None

X.setStretchLastSection(stretch)

Upstream PySide2 reference signatures (binding differences may apply):

setStretchLastSection(self, stretch: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#setStretchLastSection

setVisible

setVisible(v: bool) -> None

X.setVisible(v)

Supplemental documentation: Qt 5 reference:

[override virtual] void QHeaderView::setVisible(bool v)

Reimplements an access function for property: QWidget::visible.

Upstream PySide2 reference signatures (binding differences may apply):

setVisible(self, v: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#setVisible

showSection

showSection(logicalIndex: int) -> None

X.showSection(logicalIndex)

Supplemental documentation: Qt 5 reference:

void QHeaderView::showSection(int logicalIndex)

Shows the section specified by logicalIndex.

See also hideSection(), isSectionHidden(), hiddenSectionCount(), and setSectionHidden().

Upstream PySide2 reference signatures (binding differences may apply):

showSection(self, logicalIndex: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#showSection

showSortIndicator instance-attribute

showSortIndicator: Any

Qt 5 reference:

showSortIndicator : bool

This property holds whether the sort indicator is shown

By default, this property is false.

Access functions:

bool isSortIndicatorShown() const
void setSortIndicatorShown(bool show)

See also setSectionsClickable().

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#showSortIndicator

sizeHint instance-attribute

sizeHint: QSize

Qt 5 reference:

[override virtual] QSize QHeaderView::sizeHint() const

Reimplements: QAbstractScrollArea::sizeHint() const.

Returns a suitable size hint for this header.

See also sectionSizeHint().

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#sizeHint

sortIndicatorChanged

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

Native PythonQt.QtGui.QHeaderView.sortIndicatorChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QHeaderView::sortIndicatorChanged(int logicalIndex, Qt::SortOrder order)

This signal is emitted when the section containing the sort indicator or the order indicated is changed. The section's logical index is specified by logicalIndex and the sort order is specified by order.

This function was introduced in Qt 4.3.

See also setSortIndicator().

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#sortIndicatorChanged

sortIndicatorOrder

sortIndicatorOrder() -> Any

X.sortIndicatorOrder()

Supplemental documentation: Qt 5 reference:

Qt::SortOrder QHeaderView::sortIndicatorOrder() const

Returns the order for the sort indicator. If no section has a sort indicator the return value of this function is undefined.

See also setSortIndicator() and sortIndicatorSection().

Upstream PySide2 reference signatures (binding differences may apply):

sortIndicatorOrder(self) -> PySide2.QtCore.Qt.SortOrder

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#sortIndicatorOrder

sortIndicatorSection

sortIndicatorSection() -> int

X.sortIndicatorSection() -> int

Supplemental documentation: Qt 5 reference:

int QHeaderView::sortIndicatorSection() const

Returns the logical index of the section that has a sort indicator. By default this is section 0.

See also setSortIndicator(), sortIndicatorOrder(), and setSortIndicatorShown().

Upstream PySide2 reference signatures (binding differences may apply):

sortIndicatorSection(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#sortIndicatorSection

stretchLastSection instance-attribute

stretchLastSection: bool

Qt 5 reference:

stretchLastSection : bool

This property holds whether the last visible section in the header takes up all the available space

The default value is false.

Note: The horizontal headers provided by QTreeView are configured with this property set to true, ensuring that the view does not waste any of the space assigned to it for its header. If this value is set to true, this property will override the resize mode set on the last section in the header.

Access functions:

bool stretchLastSection() const
void setStretchLastSection(bool stretch)

See also setSectionResizeMode().

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#stretchLastSection

stretchSectionCount

stretchSectionCount() -> int

X.stretchSectionCount() -> int

Supplemental documentation: Qt 5 reference:

int QHeaderView::stretchSectionCount() const

Returns the number of sections that are set to resize mode stretch. In views, this can be used to see if the headerview needs to resize the sections when the view's geometry changes.

This function was introduced in Qt 4.1.

See also stretchLastSection.

Upstream PySide2 reference signatures (binding differences may apply):

stretchSectionCount(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#stretchSectionCount

swapSections

swapSections(first: int, second: int) -> None

X.swapSections(first, second)

Supplemental documentation: Qt 5 reference:

void QHeaderView::swapSections(int first, int second)

Swaps the section at visual index first with the section at visual index second.

This function was introduced in Qt 4.2.

See also moveSection().

Upstream PySide2 reference signatures (binding differences may apply):

swapSections(self, first: int, second: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#swapSections

verticalOffset

verticalOffset() -> int

X.verticalOffset() -> int

Supplemental documentation: Qt 5 reference:

[override virtual protected] int QHeaderView::verticalOffset() const

Reimplements: QAbstractItemView::verticalOffset() const.

Returns the vertical offset of the header. This is 0 for horizontal headers.

See also offset().

Upstream PySide2 reference signatures (binding differences may apply):

verticalOffset(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#verticalOffset

viewportEntered

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

Native PythonQt.QtGui.QHeaderView.viewportEntered; argument details are not documented.

viewportEvent

viewportEvent(e: Any) -> bool

X.viewportEvent(e) -> bool

Supplemental documentation: Qt 5 reference:

[override virtual protected] bool QHeaderView::viewportEvent(QEvent *e)

Reimplements: QAbstractItemView::viewportEvent(QEvent *event).

Upstream PySide2 reference signatures (binding differences may apply):

viewportEvent(self, e: PySide2.QtCore.QEvent) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#viewportEvent

visualIndex

visualIndex(logicalIndex: int) -> int

X.visualIndex(logicalIndex) -> int

Supplemental documentation: Qt 5 reference:

int QHeaderView::visualIndex(int logicalIndex) const

Returns the visual index position of the section specified by the given logicalIndex, or -1 otherwise.

Hidden sections still have valid visual indexes.

See also logicalIndex().

Upstream PySide2 reference signatures (binding differences may apply):

visualIndex(self, logicalIndex: int) -> int

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#visualIndex

visualIndexAt

visualIndexAt(position: int) -> int

X.visualIndexAt(position) -> int

Supplemental documentation: Qt 5 reference:

int QHeaderView::visualIndexAt(int position) const

Returns the visual index of the section that covers the given position in the viewport.

See also logicalIndexAt().

Upstream PySide2 reference signatures (binding differences may apply):

visualIndexAt(self, position: int) -> int

Source: https://doc.qt.io/archives/qt-5.15/qheaderview.html#visualIndexAt

visualRect

visualRect(index: Any) -> Any

X.visualRect(index) -> PythonQt.QtCore.QRect

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/qheaderview.html#visualRect

visualRegionForSelection

visualRegionForSelection(selection: Any) -> Any

X.visualRegionForSelection(selection) -> PythonQt.QtGui.QRegion

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/qheaderview.html#visualRegionForSelection

windowIconChanged

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

Native PythonQt.QtGui.QHeaderView.windowIconChanged; argument details are not documented.

windowIconTextChanged

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

Native PythonQt.QtGui.QHeaderView.windowIconTextChanged; argument details are not documented.

windowTitleChanged

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

Native PythonQt.QtGui.QHeaderView.windowTitleChanged; argument details are not documented.