def __init__(self, parent, nombre, args): """Recibe la lista de elementos""" QHButtonGroup.__init__(self, parent, "SeleccionSimple") ElementoWidgetOpciones.__init__(self) self.nombre = nombre self.setTitle(nombre) self.setExclusive(True) for elemento in args: boton = QRadioButton(self) boton.setText(elemento) self.insert(boton) self.diccionario[elemento] = boton self.find(0).setOn(True)