Class: QgsCollapsibleGroupBoxBasic

class qgis.gui.QgsCollapsibleGroupBoxBasic

Bases: PyQt5.QtWidgets.QGroupBox

A groupbox that collapses/expands when toggled. Basic class QgsCollapsibleGroupBoxBasic does not auto-save collapsed or checked state Holding Alt modifier key when toggling collapsed state will synchronize the toggling across other collapsible group boxes with the same syncGroup QString value Holding Shift modifier key when attempting to toggle collapsed state will expand current group box, then collapse any others with the same syncGroup QString value

Note

To add Collapsible properties in promoted QtDesigner widgets, you can add the following “Dynamic properties” by clicking on the green + in the propreties palette: bool collapsed, QString syncGroup, bool scrollOnExpand

Enums

Methods

actionEvent
changeEvent
checkClicked
checkToggled
childEvent
clearModifiers
closeEvent
collapseExpandFixes Visual fixes for when group box is collapsed/expanded
connectNotify
contextMenuEvent
create
customEvent
destroy
disconnectNotify
dragEnterEvent
dragLeaveEvent
dragMoveEvent
dropEvent
enterEvent
event
focusInEvent
focusNextChild
focusNextPrevChild
focusOutEvent
focusPreviousChild
hideEvent
init
initPainter
initStyleOption
inputMethodEvent
isCollapsed Returns the current collapsed state of this group box
isSignalConnected
keyPressEvent
keyReleaseEvent
leaveEvent
metric
mouseDoubleClickEvent
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
moveEvent
nativeEvent
paintEvent
receivers
resizeEvent
scrollOnExpand If this is set to False the parent QScrollArea will not be automatically scrolled to this widget’s contents when expanded
sender
senderSignalIndex
setCollapsed Collapse or uncollapse this groupbox
setScrollOnExpand Sets this to False to not automatically scroll parent QScrollArea to this widget’s contents when expanded
setSyncGroup Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key
sharedPainter
showEvent
syncGroup Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key
tabletEvent
timerEvent
titleRect
toggleCollapsed
updateMicroFocus
updateStyle
wheelEvent

Signals

collapsedStateChanged Signal emitted when groupbox collapsed/expanded state is changed, and when first shown [signal]

Attributes

actionEvent()
changeEvent(self, event: QEvent)
checkClicked(self, ckd: bool)
checkToggled(self, ckd: bool)
childEvent()
clearModifiers(self)
closeEvent()
collapseExpandFixes(self)

Visual fixes for when group box is collapsed/expanded

collapsedStateChanged

Signal emitted when groupbox collapsed/expanded state is changed, and when first shown [signal]

connectNotify()
contextMenuEvent()
create()
customEvent()
destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
enterEvent()
event()
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hideEvent()
init(self)
initPainter()
initStyleOption()
inputMethodEvent()
isCollapsed(self) → bool

Returns the current collapsed state of this group box

isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent(self, event: QMouseEvent)
mouseReleaseEvent(self, event: QMouseEvent)
moveEvent()
nativeEvent()
paintEvent()
receivers()
resizeEvent()
scrollOnExpand(self) → bool

If this is set to False the parent QScrollArea will not be automatically scrolled to this widget’s contents when expanded

sender()
senderSignalIndex()
setCollapsed(self, collapse: bool)

Collapse or uncollapse this groupbox

Parameters:collapse – Will collapse on True and uncollapse on False
setScrollOnExpand(self, scroll: bool)

Sets this to False to not automatically scroll parent QScrollArea to this widget’s contents when expanded

setSyncGroup(self, grp: str)

Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key

sharedPainter()
showEvent(self, event: QShowEvent)
syncGroup(self) → str

Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key

tabletEvent()
timerEvent()
titleRect(self) → QRect
toggleCollapsed(self)
updateMicroFocus()
updateStyle(self)
wheelEvent()