In QT4.5,
I use a QTableWidget, and I have connected the signal QTableWidget::itemClicked() to a custom slot like this:
connect(_table, SIGNAL(itemClicked(QTableWidgetItem*)), item, SLOT(sloItemClicked(QTableWidgetItem*)));
I create such a connection for each row I add to the table.
The problem is that the slot sloItemClicked get called more than once, it seem that it get called X time where X is the number of row in my table.
But it is calling for the same row all the time. (QTableWidgetItem that I receive is the same).
This is a problem, because when the row is clicked, I delete it. So the next time it gets called, the QTableWidgetItem is no longer valid and it crash.
If I have only one row, everything works as expected..
Any idea?
Thanks