Solved: How to remove the tick of checkBox with code?
-
wrote on 8 Jul 2014, 01:49 last edited by
I want change a Qt window. And I need to remove the tick of check Box which indicates that the ceckBox is checked using my code.Thus I can reset the checkbox return to unchecked state.The code statements may look like the followed:
if(ui->checkBox_HB->ischecked())
{
Here I want to make the checkbox return back to unchecked state.What sentence I can use here?}
-
wrote on 8 Jul 2014, 04:25 last edited by
setChecked
-
wrote on 8 Jul 2014, 04:26 last edited by
ui->checkBox_HB->setChecked(false);
-
wrote on 8 Jul 2014, 06:12 last edited by
[quote author="ankursaxena" date="1404793606"]ui->checkBox_HB->setChecked(false);
[/quote]OK,it works well,and thank you very much ! I’m a freshman to study Qt by myself.I indeed have to read more materials about Qt assistance, maybe I can solve the problem by myself.
-
wrote on 8 Jul 2014, 06:14 last edited by
[quote author="sandy.martel" date="1404793502"]setChecked
[/quote]OK, thank you very much ! I’m a freshman to study Qt by myself.I indeed have to read more materials about Qt assistance, I believe I can solve the problem by myself.
-
wrote on 8 Jul 2014, 06:22 last edited by
[quote author="Adam_wang" date="1404800096"]
[quote author="sandy.martel" date="1404793502"]setChecked
[/quote]OK, thank you very much ! I’m a freshman to study Qt by myself.I indeed have to read more materials about Qt assistance, I believe I can solve the problem by myself.[/quote]
Great ! you can now edit your first post and append Solved to the title if this issue is resolved !.
1/6