Add a slot for a cell of a QTableWidget (solved)
i have a "QTableWidget" with 4 columns and 10 rows. i want to set a signal and a slot for cell(4,4). how can i do that???
Before trying,, could you explain why you need that ?
i program a kind of mailbox.
emails are shown in a QTableWidget.
now when i click on a cell i want to see my mail, something like yahoo mail or gmail.
Then you should rather use QTableWidget's itemClicked and do the rest from there
could you explain it with some source codes?
// rest of initialization
connect(tableWidget, SIGNAL(itemClicked(QTableWidgetItem)), SLOT(onItemClicked(QTableWidgetItem*)));
void MyWidget::onItemClicked(QTableWidgetItem *item)
// Do your processing based on the item content
thanks dude :)
If this solves your problem, please update the thread title prepending [solved] so other forum users may know a solution has been found :)