QGroupBox
QGroupBox
is a widget that groups other widgets together. It provides a title and a frame around the widgets it contains.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
title |
str
|
The title of the group box. |
None
|
Signals
clicked
: Emitted when the group box is clicked.
Methods
Examples
group_box = QtWidgets.QGroupBox("Group Box")
layout = QtWidgets.QVBoxLayout()
layout.addWidget(QPushButton("Button 1"))
layout.addWidget(QPushButton("Button 2"))
group_box.setLayout(layout)
setLayout
method from the parent QWidget
class.
setTitle(title)
Set the title of the group box.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
title |
str
|
The title of the group box. |
required |
title()
Get the title of the group box.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
The title of the group box. |