In my program i'm creating lineEdit widget dynamically whenever a user enters "ADD" button.
But i'm not able to access the text of that dynamically created lineEdit.
my code is as follows...
Qt Code:
  1. on_pushButton_ADD_clicked()
  2. {
  3. QLineEdit *lineEdit = new QLineEdit;
  4. QLabel *label = new QLabel;
  5. ui->gridLayout->addWidget( label,LayoutCount,0 );
  6. ui->gridLayout->addWidget( lineEdit,LayoutCount,1 );
  7. .................
  8. }
To copy to clipboard, switch view to plain text mode 

for accessing the dynamically created lineEdit i'm trying as follows..
Qt Code:
  1. KeyList.append(ui->gridLayout->lineEdit->text());
To copy to clipboard, switch view to plain text mode 

But i'm getting error....
Please help me.!!!!!!