在此记下,以防忘记
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";
}
1万+

被折叠的 条评论
为什么被折叠?



