There are couple of ways,
1. Use the sender() to determine the signal sender, cast it to QTableWidget, but be carefule it not always safe, unless you handle it properly.
2. Use a derived QTableWidget to emit a custom signal to include the TableWidget pointer as a signal parameter along with row and col.
3. Use a signal mapper along side of the existing signals and pass the TableWidget QObject pointer as signal mapper signal, and then the required signal.
4. Send a data or global data identifier as a signal parameter, instead of the QTableWidget specific row/col, that way you woun't need to bother which TableWidget has sent the signal.
I recommend the 4th way, but it may deppend on the specific requirement.





Reply With Quote

Bookmarks