hi,
i have many checkboxes on a dialog (checkBox1, checkBox2, checkBox3...)
I also store pointers to them in a qlist:
QList<QCheckBox* > checkBoxes;
QList<QCheckBox* > checkBoxes;
To copy to clipboard, switch view to plain text mode
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()));
for(int i=0;i<checkBoxes.size();i++)
connect(checkBoxes[i],SIGNAL(clicked()),this,SLOT(checking()));
To copy to clipboard, switch view to plain text mode
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...
Bookmarks