grsandeep85
9th October 2009, 10:51
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.
void ToolForm::addEntry()
{
ToolAddDialog tooladddialog;
if (tooladddialog.exec()) {
QString toolnumber = tooladddialog.toolnolineEdit->text();
QString tooldiameter = tooladddialog.diameterlineEdit->text();
QString toollength = tooladddialog.lengthlineEdit->text();
QString toolunits = tooladddialog.unitslineEdit->text();
addEntry(toolnumber, tooldiameter, toollength, toolunits);
}
}
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.
void ToolForm::addEntry()
{
ToolAddDialog tooladddialog;
if (tooladddialog.exec()) {
QString toolnumber = tooladddialog.toolnolineEdit->text();
QString tooldiameter = tooladddialog.diameterlineEdit->text();
QString toollength = tooladddialog.lengthlineEdit->text();
QString toolunits = tooladddialog.unitslineEdit->text();
addEntry(toolnumber, tooldiameter, toollength, toolunits);
}
}