12345
ui.lineEdit_1->setText(QString::number(param[0])); ui.lineEdit_2->setText(QString::number(param[1])); ui.lineEdit_3->setText(QString::number(param[2])); ui.lineEdit_4->setText(QString::number(param[3])); // continue...
12345678910
struct type_of_ui { // ... std::vector<smart pointer> line_edit ; }; type_of_ui ui /* ... */ ; // ... for( std::size_t i = 1 ; i < line_edit.size() ; ++i ) ui.line_edit[i]->setText( QString::number(param[i]) );