labscript_utils.qtwidgets.headerview_with_widgets.HorizontalHeaderViewWithWidgets

class labscript_utils.qtwidgets.headerview_with_widgets.HorizontalHeaderViewWithWidgets(model, parent=None)[source]

Bases: QHeaderView

A QHeaderView that supports inserting arbitrary widgets into sections. Use setWidget(logical_index, widget) to set and setWidget(logical_index, None) to unset. Decorations, checkboxes or anything other than text in the headers containing widgets is unsupported, and may result in garbled output

__init__(model, parent=None)[source]

Methods

__init__(model[, parent])

acceptDrops(self)

accessibleDescription(self)

accessibleName(self)

actionEvent(self, a0)

actions(self)

activateWindow(self)

addAction(self, action)

addActions(self, actions)

addScrollBarWidget(self, widget, alignment)

adjustSize(self)

alternatingRowColors(self)

autoFillBackground(self)

autoScrollMargin(self)

backgroundRole(self)

baseSize(self)

blockSignals(self, b)

cascadingSectionResizes(self)

changeEvent(self, a0)

childAt(-> Optional[QWidget])

childEvent(self, a0)

children(self)

childrenRect(self)

childrenRegion(self)

clearFocus(self)

clearMask(self)

clearSelection(self)

close(self)

closeEditor(self, editor, hint)

closeEvent(self, a0)

closePersistentEditor(self, index)

colorCount(self)

commitData(self, editor)

connectNotify(self, signal)

contentsMargins(self)

contentsRect(self)

contextMenuEvent(self, a0)

contextMenuPolicy(self)

cornerWidget(self)

count(self)

create(self[, window, initializeWindow, ...])

createWindowContainer(window[, parent, flags])

currentChanged(self, current, old)

currentIndex(self)

cursor(self)

customEvent(self, a0)

dataChanged(self, topLeft, bottomRight[, roles])

defaultAlignment(self)

defaultDropAction(self)

defaultSectionSize(self)

deleteLater(self)

depth(self)

destroy(self[, destroyWindow, destroySubWindows])

devType(self)

devicePixelRatio(self)

devicePixelRatioF(self)

devicePixelRatioFScale()

dirtyRegionOffset(self)

disconnect(-> bool)

disconnectNotify(self, signal)

do_update_widget_positions()

dragDropMode(self)

dragDropOverwriteMode(self)

dragEnabled(self)

dragEnterEvent(self, e)

dragLeaveEvent(self, e)

dragMoveEvent(self, e)

drawFrame(self, a0)

dropEvent(self, e)

dropIndicatorPosition(self)

dumpObjectInfo(self)

dumpObjectTree(self)

dynamicPropertyNames(self)

edit()

editTriggers(self)

editorDestroyed(self, editor)

effectiveWinId(self)

ensurePolished(self)

enterEvent(self, a0)

event(self, e)

eventFilter(target, event)

Ensure we don't leave the curor set as a resize handle when the mouse moves onto a child widget:

executeDelayedItemsLayout(self)

find(a0)

findChild(-> QObjectT)

findChildren(...)

focusInEvent(self, e)

focusNextChild(self)

focusNextPrevChild(self, next)

focusOutEvent(self, e)

focusPolicy(self)

focusPreviousChild(self)

focusProxy(self)

focusWidget(self)

font(self)

fontInfo(self)

fontMetrics(self)

foregroundRole(self)

frameGeometry(self)

frameRect(self)

frameShadow(self)

frameShape(self)

frameSize(self)

frameStyle(self)

frameWidth(self)

geometry(self)

getContentsMargins(self)

grab(self[, rectangle])

grabGesture(self, type[, flags])

grabKeyboard(self)

grabMouse()

grabShortcut(self, key[, context])

graphicsEffect(self)

graphicsProxyWidget(self)

hasAutoScroll(self)

hasFocus(self)

hasHeightForWidth(self)

hasMouseTracking(self)

hasTabletTracking(self)

headerDataChanged(self, orientation, ...)

height(self)

heightForWidth(self, a0)

heightMM(self)

hiddenSectionCount(self)

hide(self)

hideEvent(self, a0)

hideSection(self, alogicalIndex)

highlightSections(self)

horizontalOffset(self)

horizontalScrollBar(self)

horizontalScrollBarPolicy(self)

horizontalScrollMode(self)

horizontalScrollbarAction(self, action)

horizontalScrollbarValueChanged(self, value)

iconSize(self)

indexAt(self, p)

indexWidget(self, index)

inherits(self, classname)

initPainter(self, painter)

initStyleOption(self, option)

initialize(self)

initializeSections()

inputMethodEvent(self, event)

inputMethodHints(self)

inputMethodQuery(self, query)

insertAction(self, before, action)

insertActions(self, before, actions)

installEventFilter(self, a0)

isActiveWindow(self)

isAncestorOf(self, child)

isEnabled(self)

isEnabledTo(self, a0)

isFirstSectionMovable(self)

isFullScreen(self)

isHidden(self)

isIndexHidden(self, index)

isLeftToRight(self)

isMaximized(self)

isMinimized(self)

isModal(self)

isPersistentEditorOpen(self, index)

isRightToLeft(self)

isSectionHidden(self, logicalIndex)

isSignalConnected(self, signal)

isSortIndicatorShown(self)

isVisible(self)

isVisibleTo(self, a0)

isWidgetType(self)

isWindow(self)

isWindowModified(self)

isWindowType(self)

itemDelegate(-> Optional[QAbstractItemDelegate])

itemDelegateForColumn(self, column)

itemDelegateForRow(self, row)

keyPressEvent(self, e)

keyReleaseEvent(self, a0)

keyboardGrabber()

keyboardSearch(self, search)

killTimer(self, id)

layout(self)

layoutDirection(self)

leaveEvent(self, a0)

length(self)

lineWidth(self)

locale(self)

logicalDpiX(self)

logicalDpiY(self)

logicalIndex(self, visualIndex)

logicalIndexAt(-> int  -> int)

lower(self)

mapFrom(self, a0, a1)

mapFromGlobal(self, a0)

mapFromParent(self, a0)

mapTo(self, a0, a1)

mapToGlobal(self, a0)

mapToParent(self, a0)

mask(self)

maximumHeight(self)

maximumSectionSize(self)

maximumSize(self)

maximumViewportSize(self)

maximumWidth(self)

metaObject(self)

metric(self, a0)

midLineWidth(self)

minimumHeight(self)

minimumSectionSize(self)

minimumSize(self)

minimumSizeHint(self)

minimumWidth(self)

model(self)

mouseDoubleClickEvent(self, e)

mouseGrabber()

mouseMoveEvent(self, e)

mousePressEvent(self, e)

mouseReleaseEvent(self, e)

move()

moveCursor(self, a0, a1)

moveEvent(self, a0)

moveSection(self, from_, to)

moveToThread(self, thread)

nativeEvent(self, eventType, message)

nativeParentWidget(self)

nextInFocusChain(self)

normalGeometry(self)

objectName(self)

offset(self)

on_columnsInserted(parent, logical_first, ...)

on_columnsRemoved(parent, logical_first, ...)

openPersistentEditor(self, index)

orientation(self)

overrideWindowFlags(self, type)

overrideWindowState(self, state)

paintEngine(self)

paintEvent(self, e)

paintSection(self, painter, rect, logicalIndex)

paintingActive(self)

palette(self)

parent(self)

parentWidget(self)

physicalDpiX(self)

physicalDpiY(self)

pos(self)

previousInFocusChain(self)

property(self, name)

pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal.

raise_(self)

receivers(self, signal)

rect(self)

releaseKeyboard(self)

releaseMouse(self)

releaseShortcut(self, id)

removeAction(self, action)

removeEventFilter(self, a0)

render(, sourceRegion, flags, ...)

repaint(-> None  -> None)

reset(self)

resetDefaultSectionSize(self)

resetHorizontalScrollMode(self)

resetVerticalScrollMode(self)

resize()

resizeContentsPrecision(self)

resizeEvent(self, e)

resizeSection(self, logicalIndex, size)

resizeSections()

restoreGeometry(self, geometry)

restoreState(self, state)

rootIndex(self)

rowsAboutToBeRemoved(self, parent, start, end)

rowsInserted(self, parent, start, end)

saveGeometry(self)

saveState(self)

scheduleDelayedItemsLayout(self)

screen(self)

scroll()

scrollBarWidgets(self, alignment)

scrollContentsBy(self, dx, dy)

scrollDirtyRegion(self, dx, dy)

scrollTo(self, index, hint)

scrollToBottom(self)

scrollToTop(self)

sectionPosition(self, logicalIndex)

sectionResizeMode(self, logicalIndex)

sectionSize(self, logicalIndex)

sectionSizeFromContents(self, logicalIndex)

sectionSizeHint(self, logicalIndex)

sectionViewportPosition(self, logicalIndex)

sectionsAboutToBeRemoved(self, parent, ...)

sectionsClickable(self)

sectionsHidden(self)

sectionsInserted(self, parent, logicalFirst, ...)

sectionsMovable(self)

sectionsMoved(self)

selectAll(self)

selectedIndexes(self)

selectionBehavior(self)

selectionChanged(self, selected, deselected)

selectionCommand(self, index[, event])

selectionMode(self)

selectionModel(self)

sender(self)

senderSignalIndex(self)

setAcceptDrops(self, on)

setAccessibleDescription(self, description)

setAccessibleName(self, name)

setAlternatingRowColors(self, enable)

setAttribute(self, attribute[, on])

setAutoFillBackground(self, enabled)

setAutoScroll(self, enable)

setAutoScrollMargin(self, margin)

setBackgroundRole(self, a0)

setBaseSize()

setCascadingSectionResizes(self, enable)

setContentsMargins()

setContextMenuPolicy(self, policy)

setCornerWidget(self, widget)

setCurrentIndex(self, index)

setCursor(self, a0)

setDefaultAlignment(self, alignment)

setDefaultDropAction(self, dropAction)

setDefaultSectionSize(self, size)

setDirtyRegion(self, region)

setDisabled(self, a0)

setDragDropMode(self, behavior)

setDragDropOverwriteMode(self, overwrite)

setDragEnabled(self, enable)

setDropIndicatorShown(self, enable)

setEditTriggers(self, triggers)

setEnabled(self, a0)

setFirstSectionMovable(self, movable)

setFixedHeight(self, h)

setFixedSize()

setFixedWidth(self, w)

setFocus()

setFocusPolicy(self, policy)

setFocusProxy(self, a0)

setFont(self, a0)

setForegroundRole(self, a0)

setFrameRect(self, a0)

setFrameShadow(self, a0)

setFrameShape(self, a0)

setFrameStyle(self, a0)

setGeometry()

setGraphicsEffect(self, effect)

setHidden(self, hidden)

setHighlightSections(self, highlight)

setHorizontalScrollBar(self, scrollbar)

setHorizontalScrollBarPolicy(self, a0)

setHorizontalScrollMode(self, mode)

setIconSize(self, size)

setIndexWidget(self, index, widget)

setInputMethodHints(self, hints)

setItemDelegate(self, delegate)

setItemDelegateForColumn(self, column, delegate)

setItemDelegateForRow(self, row, delegate)

setLayout(self, a0)

setLayoutDirection(self, direction)

setLineWidth(self, a0)

setLocale(self, locale)

setMask()

setMaximumHeight(self, maxh)

setMaximumSectionSize(self, size)

setMaximumSize()

setMaximumWidth(self, maxw)

setMidLineWidth(self, a0)

setMinimumHeight(self, minh)

setMinimumSectionSize(self, size)

setMinimumSize()

setMinimumWidth(self, minw)

setModel(self, model)

setMouseTracking(self, enable)

setObjectName(self, name)

setOffset(self, offset)

setOffsetToLastSection(self)

setOffsetToSectionPosition(self, visualIndex)

setPalette(self, a0)

setParent()

setProperty(self, name, value)

setResizeContentsPrecision(self, precision)

setRootIndex(self, index)

setSectionHidden(self, logicalIndex, hide)

setSectionResizeMode()

setSectionsClickable(self, clickable)

setSectionsMovable(self, movable)

setSelection(self, rect, flags)

setSelectionBehavior(self, behavior)

setSelectionMode(self, mode)

setSelectionModel(self, selectionModel)

setShortcutAutoRepeat(self, id[, enabled])

setShortcutEnabled(self, id[, enabled])

setSizeAdjustPolicy(self, policy)

setSizeIncrement()

setSizePolicy()

setSortIndicator(self, logicalIndex, order)

setSortIndicatorShown(self, show)

setState(self, state)

setStatusTip(self, a0)

setStretchLastSection(self, stretch)

setStyle(self, a0)

setStyleSheet(self, styleSheet)

setTabKeyNavigation(self, enable)

setTabOrder(a0, a1)

setTabletTracking(self, enable)

setTextElideMode(self, mode)

setToolTip(self, a0)

setToolTipDuration(self, msec)

setUpdatesEnabled(self, enable)

setVerticalScrollBar(self, scrollbar)

setVerticalScrollBarPolicy(self, a0)

setVerticalScrollMode(self, mode)

setViewport(self, widget)

setViewportMargins()

setVisible(self, v)

setWhatsThis(self, a0)

setWidget(logical_index[, widget])

setWindowFilePath(self, filePath)

setWindowFlag(self, a0[, on])

setWindowFlags(self, type)

setWindowIcon(self, icon)

setWindowIconText(self, a0)

setWindowModality(self, windowModality)

setWindowModified(self, a0)

setWindowOpacity(self, level)

setWindowRole(self, a0)

setWindowState(self, state)

setWindowTitle(self, a0)

setupViewport(self, viewport)

sharedPainter(self)

show(self)

showDropIndicator(self)

showEvent(self, a0)

showFullScreen(self)

showMaximized(self)

showMinimized(self)

showNormal(self)

showSection(self, alogicalIndex)

signalsBlocked(self)

size(self)

sizeAdjustPolicy(self)

sizeHint(self)

sizeHintForColumn(self, column)

sizeHintForIndex(self, index)

sizeHintForRow(self, row)

sizeIncrement(self)

sizePolicy(self)

sortIndicatorOrder(self)

sortIndicatorSection(self)

stackUnder(self, a0)

startDrag(self, supportedActions)

startTimer(self, interval[, timerType])

state(self)

statusTip(self)

stretchLastSection(self)

stretchSectionCount(self)

style(self)

styleSheet(self)

swapSections(self, first, second)

tabKeyNavigation(self)

tabletEvent(self, a0)

testAttribute(self, attribute)

textElideMode(self)

thread(self)

timerEvent(self, e)

toolTip(self)

toolTipDuration(self)

tr(self, sourceText[, disambiguation, n])

underMouse(self)

ungrabGesture(self, type)

unsetCursor(self)

unsetLayoutDirection(self)

unsetLocale(self)

update()

updateEditorData(self)

updateEditorGeometries(self)

updateGeometries(self)

updateGeometry(self)

updateMicroFocus(self)

updateSection(self, logicalIndex)

update_indents()

update_widget_positions()

updatesEnabled(self)

verticalOffset(self)

verticalScrollBar(self)

verticalScrollBarPolicy(self)

verticalScrollMode(self)

verticalScrollbarAction(self, action)

verticalScrollbarValueChanged(self, value)

viewOptions(self)

viewport(self)

viewportEvent(self, e)

viewportMargins(self)

viewportSizeHint(self)

visibleRegion(self)

visualIndex(self, logicalIndex)

visualIndexAt(self, position)

visualRect(self, index)

visualRegionForSelection(self, selection)

whatsThis(self)

wheelEvent(self, a0)

width(self)

widthMM(self)

winId(self)

window(self)

windowFilePath(self)

windowFlags(self)

windowHandle(self)

windowIcon(self)

windowIconText(self)

windowModality(self)

windowOpacity(self)

windowRole(self)

windowState(self)

windowTitle(self)

windowType(self)

x(self)

y(self)

Attributes

AboveItem

AdjustIgnored

AdjustToContents

AdjustToContentsOnFirstShow

AllEditTriggers

AnimatingState

AnyKeyPressed

BelowItem

Box

CollapsingState

ContiguousSelection

CurrentChanged

Custom

DoubleClicked

DragDrop

DragOnly

DragSelectingState

DraggingState

DrawChildren

DrawWindowBackground

DropOnly

EditKeyPressed

EditingState

EnsureVisible

ExpandingState

ExtendedSelection

Fixed

HLine

IgnoreMask

Interactive

InternalMove

MoveDown

MoveEnd

MoveHome

MoveLeft

MoveNext

MovePageDown

MovePageUp

MovePrevious

MoveRight

MoveUp

MultiSelection

NoDragDrop

NoEditTriggers

NoFrame

NoSelection

NoState

OnItem

OnViewport

Panel

PdmDepth

PdmDevicePixelRatio

PdmDevicePixelRatioScaled

PdmDpiX

PdmDpiY

PdmHeight

PdmHeightMM

PdmNumColors

PdmPhysicalDpiX

PdmPhysicalDpiY

PdmWidth

PdmWidthMM

Plain

PositionAtBottom

PositionAtCenter

PositionAtTop

Raised

ResizeToContents

ScrollPerItem

ScrollPerPixel

SelectColumns

SelectItems

SelectRows

SelectedClicked

Shadow_Mask

Shape_Mask

SingleSelection

Stretch

StyledPanel

Sunken

VLine

WinPanel

activated

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

clicked

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

customContextMenuRequested

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

destroyed

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

doubleClicked

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

entered

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

geometriesChanged

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

iconSizeChanged

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

objectNameChanged

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

pressed

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

sectionClicked

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

sectionCountChanged

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

sectionDoubleClicked

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

sectionEntered

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

sectionHandleDoubleClicked

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

sectionMoved

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

sectionPressed

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

sectionResized

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

sortIndicatorChanged

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

staticMetaObject

stylesheet

thinspace

viewportEntered

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

windowIconChanged

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

windowIconTextChanged

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

windowTitleChanged

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

do_update_widget_positions()[source]
eventFilter(target, event)[source]

Ensure we don’t leave the curor set as a resize handle when the mouse moves onto a child widget:

hideSection(self, alogicalIndex: int)[source]
on_columnsInserted(parent, logical_first, logical_last)[source]
on_columnsRemoved(parent, logical_first, logical_last)[source]
sectionSizeFromContents(self, logicalIndex: int) QSize[source]
setSectionHidden(self, logicalIndex: int, hide: bool)[source]
setStyleSheet(self, styleSheet: str | None)[source]
setWidget(logical_index, widget=None)[source]
showEvent(self, a0: QShowEvent | None)[source]
showSection(self, alogicalIndex: int)[source]
stylesheet = '\n                 QHeaderView::section {\n                 /* Will be set dynamically: */\n                 padding-top: %dpx;\n                 padding-bottom: %dpx;\n                 /* Required, otherwise set to zero upon setting any stylesheet at all: */\n                 padding-left: 4px;\n                 /* Required for some reason, otherwise other settings ignored: */\n                 color: black;\n                 }\n\n                 /* Any other style goes here: */\n                 %s\n                 '
thinspace = '\u2009'
update_indents()[source]
update_widget_positions()[source]
viewportEvent(self, e: QEvent | None) bool[source]