这里父控件是QGroupBox,子控件是QLabel
QList<QLabel*> list = ui->groupBox->findChildren<QLabel *>();
for(auto &it:list)
{
qDebug()<<it->objectName();
}
这里父控件是QGroupBox,子控件是QLabel
QList<QLabel*> list = ui->groupBox->findChildren<QLabel *>();
for(auto &it:list)
{
qDebug()<<it->objectName();
}