def buttongroup(*items):
 group = QtWidgets.QButtonGroup()
 for i in items:
  group.addButton(i)
 return group

def buttongroup ( * items ) : group = QtWidgets . QButtonGroup ( ) for i in items : group . addButton ( i ) return group
create a qbuttongroup for the specified items .