You can use the setChecked () method from QAbstractButton.
QCheckButton b;
b.setChecked( false );
Alternatively, you can use the setCheckState () method setCheckState () from QCheckButton. This gives you the option to "partially disable" it.
QCheckButton b;
b.setCheckState( Qt::Unchecked );
source
share