Channareddy
9th June 2011, 07:10
hi,
Here is my code for checking wheater the QCheckBox is checked or not.
I don't want to use SIGNALS & SLOTS.Give me some solution which has no SIGNALS & SLOT coz using SIGNALS & SLOTS its too lengthy for my code as i have to check 25 checkBoxes.So please keep it short n sweet..:)
QCheckBox *floor1 = new QCheckBox("Floor 1",this);
floor1->setCheckable(1);
if(floor1->isChecked()) //the code is crashing at this line
{
if(this->door11->isChecked())
line.append("Door 11");
}
Also i tried with below code but same problem.
if(floor1->checkState()==Qt::Checked) //the code is crashing at this line
{
if(this->door11->isChecked())
line.append("Door 11");
}
Please help me to overcome this issue ASAP...:(
Here is my code for checking wheater the QCheckBox is checked or not.
I don't want to use SIGNALS & SLOTS.Give me some solution which has no SIGNALS & SLOT coz using SIGNALS & SLOTS its too lengthy for my code as i have to check 25 checkBoxes.So please keep it short n sweet..:)
QCheckBox *floor1 = new QCheckBox("Floor 1",this);
floor1->setCheckable(1);
if(floor1->isChecked()) //the code is crashing at this line
{
if(this->door11->isChecked())
line.append("Door 11");
}
Also i tried with below code but same problem.
if(floor1->checkState()==Qt::Checked) //the code is crashing at this line
{
if(this->door11->isChecked())
line.append("Door 11");
}
Please help me to overcome this issue ASAP...:(