Emitted to change the underlying state.
The state_set signal is emitted when the user changes the switch position. The default handler keeps the state in sync with the [[email protected]:active] property.
To implement delayed state change, applications can connect to this signal, initiate the change of the underlying state, and call [ [email protected]_state] when the underlying state change is complete. The signal handler should return true to prevent the default handler from running.
Visually, the underlying state is represented by the trough color of the switch, while the [[email protected]:active] property is represented by the position of the switch.
state |
the new state of the switch |
true to stop the signal emission |