Class: QgsCollapsibleGroupBox

class qgis.gui.QgsCollapsibleGroupBox

Bases: qgis._gui.QgsCollapsibleGroupBoxBasic

A groupbox that collapses/expands when toggled and can save its collapsed and checked states. By default, it auto-saves only its collapsed state to the global settings based on the widget and it’s parent names. 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

See also

basic()

Note

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

Enums

Methods

actionEvent
changeEvent
childEvent
clearModifiers
closeEvent
collapseExpandFixes
connectNotify
contextMenuEvent
create
customEvent
destroy
disconnectNotify
dragEnterEvent
dragLeaveEvent
dragMoveEvent
dropEvent
enterEvent
event
focusInEvent
focusNextChild
focusNextPrevChild
focusOutEvent
focusPreviousChild
hideEvent
init
initPainter
initStyleOption
inputMethodEvent
isSignalConnected
keyPressEvent
keyReleaseEvent
leaveEvent
loadState Will load the collapsed and checked state
metric
mouseDoubleClickEvent
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
moveEvent
nativeEvent
paintEvent
receivers
resizeEvent
saveCheckedState
saveCollapsedState
saveKey
saveState Will save the collapsed and checked state
sender
senderSignalIndex
setSaveCheckedState Set this to True to save/restore checked state
setSaveCollapsedState Sets this to False to not save/restore collapsed state
setSettingGroup Sets this to a defined string to share save/restore states across different parent dialogs
setSettings
settingGroup Returns the name of the setting group in which the collapsed state will be saved
sharedPainter
showEvent
tabletEvent
timerEvent
titleRect
updateMicroFocus
updateStyle
wheelEvent

Signals

Attributes

actionEvent()
changeEvent()
childEvent()
clearModifiers()
closeEvent()
collapseExpandFixes()
connectNotify()
contextMenuEvent()
create()
customEvent()
destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
enterEvent()
event()
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hideEvent()
init(self)
initPainter()
initStyleOption()
inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
loadState(self)

Will load the collapsed and checked state

The configuration path from which it is loaded is defined by * The object name * The settingGroup

metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent()
receivers()
resizeEvent()
saveCheckedState(self) → bool
saveCollapsedState(self) → bool
saveKey(self) → str
saveState(self)

Will save the collapsed and checked state

The configuration path to which it is saved is defined by * The object name * The settingGroup

sender()
senderSignalIndex()
setSaveCheckedState(self, save: bool)

Set this to True to save/restore checked state

Note

only turn on mSaveCheckedState for groupboxes NOT used in multiple places or used as options for different parent objects

setSaveCollapsedState(self, save: bool)

Sets this to False to not save/restore collapsed state

setSettingGroup(self, group: str)

Sets this to a defined string to share save/restore states across different parent dialogs

setSettings(self, settings: QgsSettings)
settingGroup(self) → str

Returns the name of the setting group in which the collapsed state will be saved

sharedPainter()
showEvent(self, event: QShowEvent)
tabletEvent()
timerEvent()
titleRect()
updateMicroFocus()
updateStyle()
wheelEvent()