Hello, I have some form with fiels, combos etc. I would like to go over through all the widgets on the form and if for example it's textfield, clear it, something like that:
foreach(QObject *child, this->ui->children())
{
QLineEdit *txtField = qobject_cast<QLineEdit *>(child);
if (txtField)
{
txtField->clear();
}
}
The problem is the ui object doesn't have such property like children and I don't know how to get the whole collection of children widgets.
Maybe the form object has something like Clear method. It would be the best.
Thanks