import sys
from PyQt4 import QtCore, QtGui
class Class1(QtGui.QMainWindow):
def __init__(self):
super(Class1, self).__init__()
self.func()
Grouping of radio buttons can be done by all containers. You don't necessarily need QGroupBox, you can use QFrame instead or a QTabWidget. Your choice. Here's a sample code.
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.layoutWidget1 = QtWidgets.QWidget(self.centralwidget)
self.frame_1 = QtWidgets.QFrame(self.layoutWidget1)
self.radio_btn_a = QtWidgets.QRadioButton(self.frame_1)
self.radio_btn_a.setGeometry(QtCore.QRect(160, 80, 40, 17))
self.radio_btn_a.setObjectName("radio_btn_a")
MainWindow.setCentralWidget(self.centralwidget)