Hi All,

I have designed(Qt Designer-4.4.3) a QTableView and i need to enter the some data from another dialog with 4 lineEdits. how do i access the lineEdits values and display in the QTableView and here is the code snippet which i have implemented.
Qt Code:
  1. void ToolForm::addEntry()
  2. {
  3. ToolAddDialog tooladddialog;
  4.  
  5. if (tooladddialog.exec()) {
  6. QString toolnumber = tooladddialog.toolnolineEdit->text();
  7. QString tooldiameter = tooladddialog.diameterlineEdit->text();
  8. QString toollength = tooladddialog.lengthlineEdit->text();
  9. QString toolunits = tooladddialog.unitslineEdit->text();
  10. addEntry(toolnumber, tooldiameter, toollength, toolunits);
  11. }
  12. }
To copy to clipboard, switch view to plain text mode