A QList<QVariant> that consists of a QString that contains the name of the ui elements and, accordingly, the settings arrive in the function from the database.
Suppose: checkBox , setChecked(true) .
Question number 1: How to wrap these lines to get ui->checkBox->setChecked(true);
To me as a beginner, this solution seems to be a crutch, but it’s not a matter of mending a lot of if .
Question number 2: How to perform this task more elegantly?
Thank.