We have a QCheckBox object, when user checks it or removes check we want to call a function so we connect our function to stateChanged ( int state )
QCheckBox
stateChanged ( int state )
When some UI element should not respond to user it is appropriate to disable it. So that user would know that this element is not accepting input.