[Interest] Mapping widgets set using QTableWidget::setCellWidget() back to row, column
Murphy, Sean
smurphy at walbro.com
Tue May 3 21:24:22 CEST 2016
Does anyone have any recommendations for the Right Way to map QWidgets that are inside QTableWidget cells - populated with QTableWidget::setCellWidget() - back to the cell index that holds the widget?
When populating the table, I'm putting widgets in various cells (QSpinBoxes for example). Based on where the QSpinBox is, it needs to be tied to a different variable. Right now, all the QSpinBox items' valueChanged(int) signals are connected to one slot, so I can tell that a QSpinBox was changed, but not necessary which one.
I've got a few ideas of how to get around this, but I'm just wondering if I'm missing something obvious.
Sean
More information about the Interest
mailing list