on_changed

LayerSlider.on_changed(func)

Connect func as callback function to changes of the slider value.

Parameters:

func (callable) – Function to call when slider is changed. The function must accept a single float as its arguments.

Returns:

Connection id (which can be used to disconnect func).

Return type:

int