I have created a table using qtablewidget. The table contains a few buttons. I have connected click event for those buttons with a function. Problem is, I want know row and col of button which is sending the click event. I.E. when user is clicking a button, i want to know it’s position in the table. How do i do that?
Share
If you have some way to differentiate between the buttons themselves, you can call
from within the slot that is receiving the signal to get a pointer to the object that sent the signal (http://doc.trolltech.com/4.7/qobject.html#sender).
Otherwise you may want to look at
There is an example here: http://doc.trolltech.com/4.7/signalsandslots.html#advanced-signals-and-slots-usage