'When the button is clicked, call *func* with button label
A connection id is returned which can be used to disconnect'

def on_clicked(self, func):

    cid = self.cnt
    self.observers[cid] = func
    self.cnt += 1
    return cid
