C++ (Qt) QCheckBox *checkBox = new QCheckBox(this); checkBox -> setToolTip(tr("Удалить")); checkBox -> setText(query.value(1).toString()); connect(checkBox, SIGNAL(stateChanged(int)), this, SLOT(checkBoxTableChanged(int))); table -> setCellWidget(i, j+1, checkBox);
C++ (Qt) checkBoxTableChanged(int st){ delete qobject_cast<QCheckBox*>(QObject::sender());}