'When the slider value is changed, call *func* with the new
slider position
A connection id is returned which can be used to disconnect'

def on_changed(self, func):

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