Ok if you insist you can loop through the children of your mainwidget! But thats not really good design! But definitely better than hard coding!

Qt Code:
  1. int i = 1;
  2. do
  3. {
  4. de = parentWidget->findChild<QDateEdit *>(QString("dateEdit_%1").arg(i));
  5. if (de) {
  6. ...
  7. }
  8. ++i;
  9. } while (de);
To copy to clipboard, switch view to plain text mode 
Joh