Question
Guys please let me know how to uncheck the check box using QT C++.
Solution
use
QCheckBox::setChecked(false);
OTHER TIPS
You can use the setChecked() method from QAbstractButton.
QCheckButton b;
b.setChecked( false ); // Uncheck it
Alternatively you could use setCheckState() setCheckState() method from QCheckButton. This gives you the option to 'partially uncheck' it.
QCheckButton b;
b.setCheckState( Qt::Unchecked );
Use following code,
QCheckButton chkbox; chkbox.setChecked( false );
use the ui class of your main-window to get the icon action and uncheck it, eg.
ui->actionDraw_Polygon->setChecked(false);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow