Make a QList<QLineEdit *>. Then step through the line edits:
QList<QLineEdit *> lineEditors;
...
// you can do this:
editor->doSomething();
}
// or this:
for (int i = 0; i < lineEditors.count(); i++) {
lineEditors[i]->doSomething();
}
// or use the java-style QMutableListIterator or the standard c++ QList::iterator
QList<QLineEdit *> lineEditors;
...
// you can do this:
foreach (QLineEdit *editor, lineEditors) {
editor->doSomething();
}
// or this:
for (int i = 0; i < lineEditors.count(); i++) {
lineEditors[i]->doSomething();
}
// or use the java-style QMutableListIterator or the standard c++ QList::iterator
To copy to clipboard, switch view to plain text mode
Anyway, this is a rather basic thing incorporated in several languages. Do some reading up on C++ (www.cplusplus.com).
Bookmarks