How to get lineEdit content which is created dynamically?
-
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()
{
QLineEdit *lineEdit = new QLineEdit;
QLabel *label = new QLabel;
ui->gridLayout->addWidget( label,LayoutCount,0 );
ui->gridLayout->addWidget( lineEdit,LayoutCount,1 );
.................
}@for accessing the dynamically created lineEdit i'm trying as follows..
@KeyList.append(ui->gridLayout->lineEdit->text());
@But i'm getting error....
Please help me....HOW CAN I ACCESS lineEdit->text? -
-
[quote author="Volker" date="1319028037"]
[quote author="aurora" date="1319013560"]
please may i know how can i do that...? some format atleast....[/quote]@
QList<QLineEdit *> lineEditList;
lineEditList.add(lineEdit);
@
[/quote]THANKS A LOT...IT HELPED ME...:)
but now using combox also....
so i declared like this...
@QList<QComboBox *> TagList;@
but getting error saying that "'ComboBox' was not declared in this scope"!!!!