i add pushbutton to qtablewidget with this code:
when i click the button how can i learn its row?
ui->tableWidget->row(btn) does not work. because btn is not qtablewidgetitem
Printable View
i add pushbutton to qtablewidget with this code:
when i click the button how can i learn its row?
ui->tableWidget->row(btn) does not work. because btn is not qtablewidgetitem
isn`t currentRow???
I usually do this when adding an item to the table: first get the rowCount of the table, then add a row with that number...so that way you insert at the end and you know the rowNum to use it for future usage.
for example i have ten rows in my tablewidget and one button for each rows (total ten buttons).
when i click button in fifth row, how can i learn row number?
Have a look at this class: http://developer.qt.nokia.com/doc/qt...tionModel.html
Here you go: link