As I told you, you can loop through the children of the dialog.
But it would be easier that in designer, or in code, whatever, when you create your 50 line edits, do not add them directly to the main window, but to a holder widget.
Next, you can do:
QObjectList clist = holderWidget->children();
{
if((current = qobject_cast<QLineEdit*>(o))!=NULL)
{
// do something with txt
}
}
QObjectList clist = holderWidget->children();
QLineEdit *current = NULL;
foreach(QObject* o, clist)
{
if((current = qobject_cast<QLineEdit*>(o))!=NULL)
{
QString txt = current->text();
// do something with txt
}
}
To copy to clipboard, switch view to plain text mode
Also, you could loop directly through the children of your main window.
Regards
Bookmarks