1 Attachment(s)
How to insert the blank row in table widget when click push button
I created table widget, 3 rows and 6 columns using qt creator GUI, and it is placed on certain area of my GUI. Now, i want to insert blank row as 4th, 5th, 6th row continuously. I made slot to that push button, but i do not know what code i should use for it. Can anyone help me?
Attachment 13205
I tried this code, but it is not working. pushbutton_12 is the add button name.
void MainWindow::on_pushButton_12_clicked()
{
int i = ui->tableWidget->rowCount();
ui->tableWidget->insertRow(i);
}
Re: How to insert the blank row in table widget when click push button
What aspect of it is "not working"? The button slot is never called, a new row is not added, the new row is not added at the end...