I have defined my own class that inherits QbuttonGroup
class TupleButtonGroup(QtGui.QButtonGroup):
def __init__(self,parent, tuple_pair):
super(TupleButtonGroup, self).__init__(parent)
self.tuple_pair = tuple_pair
And on buttonclicked i want to access the user data tuple_pair and corresponding button clicked in the button group
button_group.buttonClicked[QtGui.QAbstractButton].connect(self.labelchanged)
def labelchanged(self, button):
print button.text()
The function receives the button clicked but i don't know how to access the user data in the callback