//查找第一个QLable,并返回
QLabel * re= findChild<QLabel*>();
re->setText("wangliping yangjuanjuan");
//查找名为label_2的QLabel对象,并返回
QLabel * re2= findChild<QLabel*>("label_2");
re2->setText("wangliping yangjuanjuan");
//findChildren查找所有QLabel,并返回
QList<QLabel *> re3= findChildren<QLabel*>();
for(QLabel* & n : re3){
n->setText("45780");
}
FR:徐海涛(hunkxu)