mirelon
2nd April 2010, 10:55
hi,
i have many checkboxes on a dialog (checkBox1, checkBox2, checkBox3...)
I also store pointers to them in a qlist:
QList<QCheckBox* > checkBoxes;
When i change state of one of them, I want to call a function checking().
I do it this way:
for(int i=0;i<checkBoxes.size();i++)
connect(checkBoxes[i],SIGNAL(clicked()),this,SLOT(checking()));
It is ok, but what should I do to know which checkBox was clicked inside checking() slot?
I really don't want to have a slot for each checkBox...
i have many checkboxes on a dialog (checkBox1, checkBox2, checkBox3...)
I also store pointers to them in a qlist:
QList<QCheckBox* > checkBoxes;
When i change state of one of them, I want to call a function checking().
I do it this way:
for(int i=0;i<checkBoxes.size();i++)
connect(checkBoxes[i],SIGNAL(clicked()),this,SLOT(checking()));
It is ok, but what should I do to know which checkBox was clicked inside checking() slot?
I really don't want to have a slot for each checkBox...