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 valueNote
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
- param event:
- param ckd:
- param ckd:
Visual fixes for when group box is collapsed/expanded
Returns the current collapsed state of this group box
- param event:
- param event:
If this is set to
False
the parent QScrollArea will not be automatically scrolled to this widget's contents when expandedCollapse or uncollapse this groupbox
Sets this to
False
to not automatically scroll parent QScrollArea to this widget's contents when expandedOverridden to prepare base call and avoid crash due to specific QT versions
Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key
- param event:
Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key
- rtype:
QRect
Signals
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
- actionEvent(self, QActionEvent)¶
- changeEvent(self, event: QEvent)¶
- Parameters:
event (QEvent) –
- checkClicked(self, ckd: bool)¶
- Parameters:
ckd (bool) –
- checkToggled(self, ckd: bool)¶
- Parameters:
ckd (bool) –
- childEvent(self, QChildEvent)¶
- clearModifiers(self)¶
- closeEvent(self, QCloseEvent)¶
- collapseExpandFixes(self)¶
Visual fixes for when group box is collapsed/expanded
- collapsedStateChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- connectNotify(self, QMetaMethod)¶
- contextMenuEvent(self, QContextMenuEvent)¶
- create(self, window: PyQt5.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)¶
- customEvent(self, QEvent)¶
- destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)¶
- disconnectNotify(self, QMetaMethod)¶
- dragEnterEvent(self, QDragEnterEvent)¶
- dragLeaveEvent(self, QDragLeaveEvent)¶
- dragMoveEvent(self, QDragMoveEvent)¶
- dropEvent(self, QDropEvent)¶
- enterEvent(self, QEvent)¶
- event(self, QEvent) bool ¶
- focusInEvent(self, QFocusEvent)¶
- focusNextChild(self) bool ¶
- focusNextPrevChild(self, bool) bool ¶
- focusOutEvent(self, QFocusEvent)¶
- focusPreviousChild(self) bool ¶
- hideEvent(self, QHideEvent)¶
- init(self)¶
- initPainter(self, QPainter)¶
- initStyleOption(self, QStyleOptionGroupBox)¶
- inputMethodEvent(self, QInputMethodEvent)¶
- isCollapsed(self) bool ¶
Returns the current collapsed state of this group box
- Return type:
bool
- isSignalConnected(self, QMetaMethod) bool ¶
- keyPressEvent(self, QKeyEvent)¶
- keyReleaseEvent(self, QKeyEvent)¶
- leaveEvent(self, QEvent)¶
- metric(self, QPaintDevice.PaintDeviceMetric) int ¶
- mouseDoubleClickEvent(self, QMouseEvent)¶
- mouseMoveEvent(self, QMouseEvent)¶
- mousePressEvent(self, event: QMouseEvent)¶
- Parameters:
event (QMouseEvent) –
- mouseReleaseEvent(self, event: QMouseEvent)¶
- Parameters:
event (QMouseEvent) –
- moveEvent(self, QMoveEvent)¶
- nativeEvent(self, Union[QByteArray, bytes, bytearray], PyQt5.sip.voidptr) Tuple[bool, int] ¶
- paintEvent(self, QPaintEvent)¶
- receivers(self, PYQT_SIGNAL) int ¶
- resizeEvent(self, QResizeEvent)¶
- 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(self) QObject ¶
- senderSignalIndex(self) int ¶
- setCollapsed(self, collapse: bool)¶
Collapse or uncollapse this groupbox
- Parameters:
collapse (bool) – Will collapse on
True
and uncollapse onFalse
- setScrollOnExpand(self, scroll: bool)¶
Sets this to
False
to not automatically scroll parent QScrollArea to this widget’s contents when expanded- Parameters:
scroll (bool) –
- setStyleSheet(self, style: str)¶
Overridden to prepare base call and avoid crash due to specific QT versions
New in version 3.16.
- Parameters:
style (str) –
- setSyncGroup(self, grp: str)¶
Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key
- Parameters:
grp (str) –
- 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(self, QTabletEvent)¶
- timerEvent(self, QTimerEvent)¶
- titleRect(self) QRect ¶
- Return type:
QRect
- toggleCollapsed(self)¶
- updateMicroFocus(self)¶
- updateStyle(self)¶
- wheelEvent(self, QWheelEvent)¶