Guys please let me know how to uncheck the check box using QT C++.
Asked
Active
Viewed 2.1k times
8
-
1Please accept answers on some of your old questions, you're much more likely to get helpful feedback! – Dave McClelland Dec 23 '10 at 16:59
4 Answers
16
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 );

André
- 18,348
- 6
- 60
- 74
0
use the ui class of your main-window to get the icon action and uncheck it, eg.
ui->actionDraw_Polygon->setChecked(false);

ejectamenta
- 1,047
- 17
- 20