[Interest] Telling which QTableWidgetItem was changed?

2014-07-01 Thread Robert Wood
Folks, I have a dynamically created table; whenever I add a new row, I do this: QCheckBox *cb = new QCheckBox(); ui->innoLEDListTable->setCellWidget(row,0,cb); connect(cb,SIGNAL(clicked()),this,SLOT(tableItemClicked())); Now this works fine in that whenever I click a check box

Re: [Interest] Telling which QTableWidgetItem was changed?

2014-07-01 Thread Robert Wood
FWIW, and maybe this will help someone else because I've seen a zillion similar requests with Google searches and no decipherable answer: row = ui->innoLEDListTable->rowCount(); ui->innoLEDListTable->insertRow(row); QTableWidgetItem *tw = new QTableWidgetItem(row); tw->data(Qt

Re: [Interest] Telling which QTableWidgetItem was changed?

2014-07-01 Thread Christoph Kurz
Hi Robert, What you mention is a common problem, which I also encountered... the solution is to use a QSignalMapper. It maps a signal to a signal with an object (or int or string). It is quite easy, in my case just a few lines of code.   You can use it like this (copied from one of my projects). I