radio_button_1 = QRadioButton("Option 1") radio_button_1.setChecked(True)
group_box = QGroupBox("Options") radio_button_1 = QRadioButton("Option 1") radio_button_2 = QRadioButton("Option 2") radio_button_3 = QRadioButton("Option 3") radio_button_1.setChecked(True) # Add the radio buttons to the group box vbox = QVBoxLayout() vbox.addWidget(radio_button_1) vbox.addWidget(radio_button_2) vbox.addWidget(radio_button_3) group_box.setLayout(vbox)These examples illustrate how the setChecked method of the QRadioButton class can be used to set the default or checked option among a group of radio buttons. The package library used is PyQt5.