Since you know row and column when creating the checkbox, I would just store these values as dynamic properties on the object and connect to the checkbox' toggled signal
cb1->setProperty("row", ctr);
cb1->setProperty("column", 6);
connect(cb1, SIGNAL(toggled(bool)), this, SLOT(checkBoxToggled(bool)));
cb1->setProperty("row", ctr);
cb1->setProperty("column", 6);
connect(cb1, SIGNAL(toggled(bool)), this, SLOT(checkBoxToggled(bool)));
To copy to clipboard, switch view to plain text mode
void MyClass::checkBoxBoxToggled(bool on)
{
const int row = cb->property("row");
const int column = cb->property("column");
}
void MyClass::checkBoxBoxToggled(bool on)
{
QObject *cb = sender();
const int row = cb->property("row");
const int column = cb->property("column");
}
To copy to clipboard, switch view to plain text mode
Cheers,
_
Bookmarks