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

Methods

actionEvent

changeEvent

param event

checkClicked

param ckd

checkToggled

param ckd

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

param event

mouseReleaseEvent

param event

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

param event

syncGroup

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

tabletEvent

timerEvent

titleRect

rtype

QRect

toggleCollapsed

updateMicroFocus

updateStyle

wheelEvent

Signals

collapsedStateChanged

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

actionEvent()
changeEvent(self, event: QEvent)
Parameters

event (QEvent) –

checkClicked(self, ckd: bool)
Parameters

ckd (bool) –

checkToggled(self, ckd: bool)
Parameters

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]

Parameters

collapsed (bool) –

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

Return type

bool

isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent(self, event: QMouseEvent)
Parameters

event (QMouseEvent) –

mouseReleaseEvent(self, event: QMouseEvent)
Parameters

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

Return type

bool

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

Collapse or uncollapse this groupbox

Parameters

collapse (bool) – 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

Parameters

scroll (bool) –

setSyncGroup(self, grp: str)

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

Parameters

grp (str) –

sharedPainter()
showEvent(self, event: QShowEvent)
Parameters

event (QShowEvent) –

syncGroup(self) → str

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

Return type

str

tabletEvent()
timerEvent()
titleRect(self) → QRect
Return type

QRect

toggleCollapsed(self)
updateMicroFocus()
updateStyle(self)
wheelEvent()