문제
Guys please let me know how to uncheck the check box using QT C++.
해결책
use
QCheckBox::setChecked(false);
다른 팁
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);
제휴하지 않습니다 StackOverflow