Попробуйте:
from PyQt5 import QtGui, QtCore, QtWidgets
class Window(QtWidgets.QWidget):
def __init__(self, parent=None):
super().__init__(parent)
self.groupBox = QtWidgets.QGroupBox()
self.rb1_1 = QtWidgets.QRadioButton("rb1_1", self.groupBox)
self.rb1_1.setChecked(True)
self.rb1_2 = QtWidgets.QRadioButton("rb1_2", self.groupBox)
self.hLayout = QtWidgets.QHBoxLayout()
self.hLayout.addWidget(self.rb1_1)
self.hLayout.addWidget(self.rb1_2)
self.lb1 = QtWidgets.QLabel()
self.pb1 = QtWidgets.QPushButton("pb1")
self.pb1.clicked.connect(lambda : self.rbtn_1_state(
self.rb1_1.isChecked(),
self.rb1_2.isChecked()))
self.vLayout = QtWidgets.QVBoxLayout(self)
self.vLayout.addWidget(self.lb1)
self.vLayout.addLayout(self.hLayout)
self.vLayout.addWidget(self.pb1)
def rbtn_1_state(self, rb1_1_chk, rb1_2_chk):
self.lb1.setText("rb1_1-> {} , rb1_2-> {}".format(rb1_1_chk, rb1_2_chk))
if __name__ == '__main__':
import sys
app = QtWidgets.QApplication(sys.argv)
qt_app = Window()
qt_app.show()
sys.exit(app.exec_())