在此记下,以防忘记
QObjectList objList=objParent->children();
foreach(QObject *obj,objList)
{
if(!obj->isWidgetType() ) continue;
QLineEdit textBox;
textBox.name=objParent->objectName() + "/" +obj->objectName();
if(obj->inherits("QCheckBox") )
textBox.name+=dynamic_cast<QCheckBox*>(obj)->isChecked()==0?"0":"1";
}