hi i am trying to get the inputs from 4 line edit widgets and paste it into table-widgets & also able to fill the first row in table .
can any one help me out how to check whether the first row is filled and if it is filled how to add the data s in the next consecutive rows one by one in table widget

Any one can suggest me some solutions.


Thanks in advance

Qt Code:
  1. void Widget::on_pushButton_Add_clicked()
  2. {
  3.  
  4.  
  5. ui->tableWidget->setItem(0, 0, new QTableWidgetItem(ui->lineEdit_UDPport->text()));
  6. ui->tableWidget->setItem(0, 1, new QTableWidgetItem(ui->lineEdit_DataName->text()));
  7. ui->tableWidget->setItem(0, 2, new QTableWidgetItem(ui->lineEdit_DataAddress->text()));
  8. ui->tableWidget->setItem(0, 3, new QTableWidgetItem(ui->comboBox_DataType->currentText()));
  9. ui->tableWidget->setItem(0, 4, new QTableWidgetItem(ui->lineEdit_DataLength->text()));
  10.  
  11. }
To copy to clipboard, switch view to plain text mode