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...
on_pushButton_ADD_clicked()
{
ui->gridLayout->addWidget( label,LayoutCount,0 );
ui->gridLayout->addWidget( lineEdit,LayoutCount,1 );
.................
}
on_pushButton_ADD_clicked()
{
QLineEdit *lineEdit = new QLineEdit;
QLabel *label = new QLabel;
ui->gridLayout->addWidget( label,LayoutCount,0 );
ui->gridLayout->addWidget( lineEdit,LayoutCount,1 );
.................
}
To copy to clipboard, switch view to plain text mode
for accessing the dynamically created lineEdit i'm trying as follows..
KeyList.append(ui->gridLayout->lineEdit->text());
KeyList.append(ui->gridLayout->lineEdit->text());
To copy to clipboard, switch view to plain text mode
But i'm getting error....
Please help me.!!!!!!
Bookmarks